2010-03-09 07:06:29 +08:00
|
|
|
require("../common");
|
2009-06-21 20:06:03 +08:00
|
|
|
|
|
|
|
var exit_status = -1;
|
|
|
|
|
2009-10-30 06:34:10 +08:00
|
|
|
var cat = process.createChildProcess("cat");
|
2009-06-24 19:58:17 +08:00
|
|
|
|
2009-11-29 01:26:59 +08:00
|
|
|
cat.addListener("output", function (chunk) { assert.equal(null, chunk); });
|
|
|
|
cat.addListener("error", function (chunk) { assert.equal(null, chunk); });
|
2009-08-27 00:22:00 +08:00
|
|
|
cat.addListener("exit", function (status) { exit_status = status; });
|
2009-06-21 20:06:03 +08:00
|
|
|
|
2009-08-27 00:22:00 +08:00
|
|
|
cat.kill();
|
2009-06-21 20:06:03 +08:00
|
|
|
|
2009-08-27 00:51:04 +08:00
|
|
|
process.addListener("exit", function () {
|
2009-11-29 01:26:59 +08:00
|
|
|
assert.equal(true, exit_status > 0);
|
2009-08-27 00:51:04 +08:00
|
|
|
});
|