Look-alike nodejs 0.6.x child_process.fork() function module for nodejs 0.4.x and 0.6.x
node-fork version 0.3.0 the API has been changed to
require('fork').fork; to get a reference to the
silentoption can be used to stop child output to stdout/stderr.
node-fork can be installed from NPM with:
npm install node-fork
The code almost speaks for itself: see the example directories showing visisble and invisible examples!!
Following is a invisible example of node-fork use.
Parent code example:
var path =inspect = inspectfork = fork;var child;trychild = ;catch errconsole;process;child;child;
Child code example (child.js):
To build node-fork and run the tests after checking it out from git:
or to use a direct install script do:
nvm multi compilation do:
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.