joyent/node — Issue #2889: child.pid no longer becomes 0 when the process dies (0.6.12)
Author: fjakobs
Created: 2012-03-07 14:02:36+00:00
State: open

In node 0.4 the `pid` property of the child object returned by child_proces.spawn() became `null` once the process died. In node 0.6 this is no longer the case. When the process dies child.pid keeps the same.

```javascript
var spawn = require("child_process").spawn;
var assert = require("assert");

var child = spawn("ls");
child.on("exit", function() {
assert.equal(child.pid, null);
});
```

works in node 0.4 but fails in node 0.6