ws.on 'close', -> ps.kill()
ws.on('close', function() { return ps.kill(); });
Edit: it was meant to be a reply to the parent.