2009-10-05 15:46:31 +02:00
|
|
|
node.mixin(require("common.js"));
|
2009-06-21 14:06:03 +02:00
|
|
|
|
|
|
|
var exit_status = -1;
|
|
|
|
|
2009-08-26 22:11:51 +02:00
|
|
|
var cat = node.createChildProcess("cat");
|
2009-06-24 13:58:17 +02:00
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
cat.addListener("output", function (chunk) { assertEquals(null, chunk); });
|
|
|
|
cat.addListener("error", function (chunk) { assertEquals(null, chunk); });
|
|
|
|
cat.addListener("exit", function (status) { exit_status = status; });
|
2009-06-21 14:06:03 +02:00
|
|
|
|
2009-08-26 18:22:00 +02:00
|
|
|
cat.kill();
|
2009-06-21 14:06:03 +02:00
|
|
|
|
2009-08-26 18:51:04 +02:00
|
|
|
process.addListener("exit", function () {
|
2009-06-21 14:06:03 +02:00
|
|
|
assertTrue(exit_status > 0);
|
2009-08-26 18:51:04 +02:00
|
|
|
});
|