New package for factory: daemonize
Hey everybody, I created a new package for `daemonize`, and I'd like to submit that to Factory. Quoting the package (and program's) description: daemonize runs a command as a Unix daemon. As defined in W. Richard Stevens'1990 book, Unix Network Programming (Addison-Wesley, 1990), a daemon is "a process that executes 'in the background' (i.e., without an associated terminal or login shell) either waiting for some event to occur, or waiting to perform some specified task on a periodic basis." Upon startup, a typical daemon program will: - Close all open file descriptors (especially standard input, standard output and standard error) - Change its working directory to the root filesystem, to ensure that it doesn’t tie up another filesystem and prevent it from being unmounted - Reset its umask value - Run in the background (i.e., fork) - Disassociate from its process group (usually a shell), to insulate itself from signals (such as HUP) sent to the process group - Ignore all terminal I/O signals - Disassociate from the control terminal (and take steps not to reacquire one) - Handle any SIGCLD signals Most programs that are designed to be run as daemons do that work for themselves. However, you’ll occasionally run across one that does not. When you must run a daemon program that does not properly make itself into a true Unix daemon, you can use daemonize to force it to run as a true daemon. The upstream looks in a healthy state, the program is tiny and it doesn't need further patches, it's quite easy to maintain and I just wanted my distro to have it in its repositories. Thank you so much for the attention, Alessio
On Tue, Feb 27, 2024 at 6:54 AM Alessio Biancalana via openSUSE Factory <factory@lists.opensuse.org> wrote:
Hey everybody, I created a new package for `daemonize`, and I'd like to submit that to Factory.
Quoting the package (and program's) description:
daemonize runs a command as a Unix daemon. As defined in W. Richard Stevens'1990 book, Unix Network Programming (Addison-Wesley, 1990), a daemon is "a process that executes 'in the background' (i.e., without an associated terminal or login shell) either waiting for some event to occur, or waiting to perform some specified task on a periodic basis." Upon startup, a typical daemon program will:
- Close all open file descriptors (especially standard input, standard output and standard error) - Change its working directory to the root filesystem, to ensure that it doesn’t tie up another filesystem and prevent it from being unmounted - Reset its umask value - Run in the background (i.e., fork) - Disassociate from its process group (usually a shell), to insulate itself from signals (such as HUP) sent to the process group - Ignore all terminal I/O signals - Disassociate from the control terminal (and take steps not to reacquire one) - Handle any SIGCLD signals
Most programs that are designed to be run as daemons do that work for themselves. However, you’ll occasionally run across one that does not. When you must run a daemon program that does not properly make itself into a true Unix daemon, you can use daemonize to force it to run as a true daemon.
The upstream looks in a healthy state, the program is tiny and it doesn't need further patches, it's quite easy to maintain and I just wanted my distro to have it in its repositories.
I'm curious what would this be used for that systemd-run(1) wouldn't work for? systemd-run(1) also enables running arbitrary processes as services in the background or the foreground through the systemd framework, and in many respects could be considered a successor to daemonize(1). -- 真実はいつも一つ!/ Always, there's only one truth!
Il giorno mar, 27/02/2024 alle 07.27 -0500, Neal Gompa ha scritto:
On Tue, Feb 27, 2024 at 6:54 AM Alessio Biancalana via openSUSE Factory <factory@lists.opensuse.org> wrote:
Hey everybody, ...
I'm curious what would this be used for that systemd-run(1) wouldn't work for? systemd-run(1) also enables running arbitrary processes as services in the background or the foreground through the systemd framework, and in many respects could be considered a successor to daemonize(1).
I literally had no idea systemd-run was a thing :-) I just used daemonize to make a tiny daemon on all of my workstations and since I found that in other distributions' repositories I thought it was a good idea to take care of packaging that for openSUSE myself. I have to verify if I can accomplish all my usecases using systemd-run but it definitely looks good! Alessio
participants (2)
-
alessio.biancalana@suse.com
-
Neal Gompa