diff --git a/app.js b/app.js index 3023a5f..141306d 100644 --- a/app.js +++ b/app.js @@ -7,10 +7,6 @@ var pty = require('pty.js'); var fs = require('fs'); var waitpid = require('waitpid'); -process.on('SIGCHLD', function(args){ - waitpid(-1); -}); - var opts = require('optimist') .options({ sslkey: { @@ -129,11 +125,15 @@ wss.on('request', function(request) { rows: 30 }); } + console.log((new Date()) + " PID=" + term.pid + " STARTED on behalf of user=" + sshuser) term.on('data', function(data) { conn.send(JSON.stringify({ data: data })); }); + term.on('exit', function(code) { + console.log((new Date()) + " PID=" + term.pid + " ENDED") + }) } if (!data) return; diff --git a/package.json b/package.json index 3e997ec..7ae305d 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "dependencies": { "express": "3.5.1", "websocket": "", - "pty.js": "", + "pty.js": "git+https://github.com/terryschen/pty.js", "optimist": "", "waitpid": "" }, diff --git a/public/index.html b/public/index.html index a71d745..00281a9 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - wtf + Wetty - The WebTTY Terminal Emulator diff --git a/public/wetty/index.html b/public/wetty/index.html index a71d745..00281a9 100644 --- a/public/wetty/index.html +++ b/public/wetty/index.html @@ -3,7 +3,7 @@ - wtf + Wetty - The WebTTY Terminal Emulator