webtty.js: remove tty-module code.
This commit is contained in:
parent
5d2a367e1d
commit
e6cb51d8bf
1 changed files with 0 additions and 5 deletions
|
|
@ -3,7 +3,6 @@ var http = require('http');
|
|||
var url = require('url');
|
||||
var path = require('path');
|
||||
var fs = require('fs');
|
||||
//var tty = require("tty");
|
||||
var child_process = require("child_process");
|
||||
|
||||
var serveStaticRoot = "/home/elwin/hk/nodejs/rlg/s/";
|
||||
|
|
@ -23,13 +22,10 @@ function TermSession(sessid) {
|
|||
}
|
||||
// Should setsid get set?
|
||||
var spawnopts = {"env": childenv, "cwd": process.env["HOME"]};
|
||||
//var pterm = tty.open("/bin/bash");
|
||||
this.child = child_process.spawn(ptyhelp, ["bash"], spawnopts);
|
||||
var ss = this;
|
||||
/* Eventually we'll need to make sure the sessid isn't in use yet. */
|
||||
this.sessid = sessid;
|
||||
//this.ptmx = pterm[0];
|
||||
//this.child = pterm[1];
|
||||
this.alive = true;
|
||||
this.data = [];
|
||||
this.child.stdout.on("data", function (buf) {
|
||||
|
|
@ -74,7 +70,6 @@ function TermSession(sessid) {
|
|||
/* Call this when the child is dead. */
|
||||
if (this.alive)
|
||||
return;
|
||||
//ss.ptmx.destroy();
|
||||
/* Give the client a chance to read any leftover data. */
|
||||
if (ss.data.length > 0)
|
||||
setTimeout(ss.remove, 8000);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue