Sha256: 4131b96920502ebaf27bd7388c3e7768864b8802c7d22cfc109ac4a31741bebf
Contents?: true
Size: 631 Bytes
Versions: 3
Compression:
Stored size: 631 Bytes
Contents
common = require("../common"); assert = common.assert console.log("process.pid: " + process.pid); var first = 0, second = 0; process.addListener('SIGUSR1', function () { console.log("Interrupted by SIGUSR1"); first += 1; }); process.addListener('SIGUSR1', function () { second += 1; setTimeout(function () { console.log("End."); process.exit(0); }, 5); }); i = 0; setInterval(function () { console.log("running process..." + ++i); if (i == 5) { process.kill(process.pid, "SIGUSR1"); } }, 1); process.addListener("exit", function () { assert.equal(1, first); assert.equal(1, second); });
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rednode-0.1.2 | ext/node/test/simple/test-signal-handler.js |
rednode-0.1.1 | ext/node/test/simple/test-signal-handler.js |
rednode-0.1.0 | ext/node/test/simple/test-signal-handler.js |