Name : perl-Proc-Daemon
| |
Version : 0.23
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp155.1.1
| Date : 2023-07-20 19:34:27
|
Group : Development/Libraries/Perl
| Source RPM : perl-Proc-Daemon-0.23-lp155.1.1.src.rpm
|
Size : 0.06 MB
| |
Packager : https://www_suse_com/
| |
Summary : Run Perl program(s) as a daemon process
|
Description :
This module can be used by a Perl program to initialize itself as a daemon or to execute (\'exec\') a system command as daemon. You can also check the status of the daemon (alive or dead) and you can kill the daemon.
A daemon is a process that runs in the background with no controlling terminal. Generally servers (like FTP, HTTP and SIP servers) run as daemon processes. Do not make the mistake to think that a daemon is a server. ;-)
Proc::Daemon does the following:
* 1
The script forks a child.
* 2
The child changes the current working directory to the value of \'work_dir\'.
* 3
The child clears the file creation mask.
* 4
The child becomes a session leader, which detaches the program from the controlling terminal.
* 5
The child forks another child (the final daemon process). This prevents the potential of acquiring a controlling terminal at all and detaches the daemon completely from the first parent.
* 6
The second child closes all open file descriptors (unless you define \'dont_close_fh\' and/or \'dont_close_fd\').
* 7
The second child opens STDIN, STDOUT and STDERR to the location defined in the constructor (\'new\').
* 8
The second child returns to the calling script, or the program defined in \'exec_command\' is executed and the second child never returns.
* 9
The first child transfers the PID of the second child (daemon) to the parent. Additionally the PID of the daemon process can be written into a file if \'pid_file\' is defined. Then the first child exits.
* 10
If the parent script is looking for a return value, then the PID(s) of the child/ren will be returned. Otherwise the parent will exit.
NOTE: Because of the second fork the daemon will not be a session-leader and therefore Signals will not be send to other members of his process group. If you need the functionality of a session-leader you may want to call POSIX::setsid() manually at your daemon.
INFO: Since \'fork\' is not performed the same way on Windows systems as on Linux, this module does not work with Windows. Patches appreciated!
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-P/15.5/noarch |