(vicare posix daemonisations) implements facilities
that turn a running process into a daemon; it is build on top of
(vicare posix). A daemon process is a process that runs
in the background with no controlling process, usually to provide
Process daemonisation is usually performed in the early phase of a process start up, before the any actual work is performed. The daemonisation involves forking a child process and exiting the parent process; this changes the ID of the surviving process.
The following bindings are exported by the library
Turn the current process into a daemon. If successful: return a fixnum representing the new process group ID, else raise an exception. Follow this procedure:
1assume this process is already a daemon and return doing nothing else.
1is the ID of the
(vicare posix). signal-bub-init.
(vicare posix); exit the parent process with status code 0. The daemon process is the child. fork.
2replacing them with the new file descriptor.
(vicare posix). setsid.
(vicare posix). signal-bub-final.