Browse Source

On SIGCHLD do waitpid(-1). use the package 'waitpid'.

Not sure if there is a better way to handle this but this works.
Related PR on pty.js : https://github.com/chjj/pty.js/pull/37
pull/5/head
Krishna Srinivas 11 years ago
parent
commit
cc4f9d93da
  1. 5
      app.js
  2. 3
      package.json

5
app.js

@ -5,6 +5,11 @@ var path = require('path');
var ws = require('websocket').server;
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({

3
package.json

@ -5,7 +5,8 @@
"express": "3.5.1",
"websocket": "",
"pty.js": "",
"optimist": ""
"optimist": "",
"waitpid": ""
},
"description": "Wetty = Web + tty. Terminal access in browser over http/https ",
"main": "app.js",

Loading…
Cancel
Save