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