Skip to content

Commit

Permalink
On SIGCHLD do waitpid(-1). use the package 'waitpid'.
Browse files Browse the repository at this point in the history
Not sure if there is a better way to handle this but this works.
Related PR on pty.js : chjj/pty.js#37
  • Loading branch information
krishnasrinivas committed May 3, 2014
1 parent 64719c0 commit cc4f9d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit cc4f9d9

Please sign in to comment.