mirror of https://github.com/lukechilds/node.git
Tj Holowaychuk
14 years ago
committed by
Ryan Dahl
2 changed files with 30 additions and 6 deletions
@ -0,0 +1,20 @@ |
|||
|
|||
var assert = require('assert'); |
|||
var spawn = require('child_process').spawn; |
|||
|
|||
var cat = spawn('cat'); |
|||
var called; |
|||
|
|||
process.kill(cat.pid, 0); |
|||
|
|||
cat.stdout.on('data', function(){ |
|||
called = true; |
|||
process.kill(cat.pid, 'SIGKILL'); |
|||
}); |
|||
|
|||
// EPIPE when null sig fails
|
|||
cat.stdin.write('test'); |
|||
|
|||
process.on('exit', function(){ |
|||
assert.ok(called); |
|||
}); |
Loading…
Reference in new issue