class Daemonize
- Daemonize
- Reference
- Object
Defined in:
contrib/daemonize.crConstant Summary
-
VERSION =
"0.1.0"
Class Method Summary
-
.daemonize(stdin : String = "/dev/null", stdout : String = "/dev/null", stderr : String = "/dev/null", dir : String = "/")
Daemonizes the process
- .setsid
- .sid(pid : Int32 = 0)
Class Method Detail
def self.daemonize(stdin : String = "/dev/null", stdout : String = "/dev/null", stderr : String = "/dev/null", dir : String = "/")
#
Daemonizes the process
This method detaches the process from the terminal so the program may run in the backgound without the terminal.
By default STDIN, STDOUT, and STDERR are redirected to /dev/null. They may be redirected to a file to be read-in by STDIN, or written- to by STDOUT and STDERR.
By default, the daemonized process will change to root as a working directory. Another working directory can be provided.