Properly handle child process exit codes
authorFelix Geisendörfer <felix@debuggable.com>
Wed, 28 Apr 2010 13:04:08 +0000 (15:04 +0200)
committerRyan Dahl <ry@tinyclouds.org>
Wed, 28 Apr 2010 20:54:17 +0000 (13:54 -0700)
commitf8a3cf980f09b48ce1c56f11dc47e204093ac8b2
tree612ac9300b627940ed6fd48c353352a32ecea814
parent9b2aac61b28056418ee3a8fdb2c7226acc65d37c
Properly handle child process exit codes

The child process 'exit' was returning the status of the process, rather than
the exit code. This patch properly deconstructs the status into the exit code
and the term signal a process may have received.

See:
http://pod.tst.eu/http://cvs.schmorp.de/libev/ev.pod#Watcher_Specific_Functions_and_Data_-5
and waitpid(2)
doc/api.markdown
lib/child_process.js
src/node.cc
src/node.h
src/node_child_process.cc
test/fixtures/exit.js [new file with mode: 0644]
test/simple/test-child-process-exit-code.js [new file with mode: 0644]
test/simple/test-child-process-kill.js
test/simple/test-exec.js