AndreasMadsen/immortal — pull request #3 by AndreasMadsen (2012-02-27 12:08:29+00:00)
Title: [refactor] immortal 0.3.0

this refactor isolate the daemon and its child from the parent there called `immortal.start`. This is done by using `setsid` on posix platforms. Windows works differently and do not require `setsid` to start a new session it is enough that the process is detach so on windows `execute.js` will still be used here.

To go around the fork-safe issue with node. `fork(2)` isn't done in a addon-module but runs in a executable subroutine. This subroutine has nothing to do with node.

Unfortunately the subroutine do required to be complied to simplify the flow prebuild binary files has been created, when installing `immortal` using `npm` one of these will be symlinked to `lib/executables/execute`. This way users don't need to worry about compiling.

However since I can't build to all the OS in the world the setup.js executed by `npm` when installing will ask the user to create an issue if there OS isn't supported, and a simple makefile do also exist. In the future we might add support for un-supported OS'es by trying to build the subroutine in `setup.js` and aks them to file an pull request. But for now this won't happen since it's unlikely users will create issues if there aren't any.

Furthermore support for the build in unattach support in node 0.7 has been added, this feacture is however disabled since it hasn't landed yet.