Sujet : Re: nohup Versus setsid
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.unix.shellDate : 12. Sep 2024, 13:11:35
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240912050321.649@kylheku.com>
References : 1
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-09-12, Lawrence D'Oliveiro <
ldo@nz.invalid> wrote:
It has long seemed to me that nohup(1) was an old, hacky way of doing
what can be done more elegantly using setsid(1). Compare the docs for
yourself <https://manpages.debian.org/1/nohup.1.en.html> vs
<https://manpages.debian.org/1/setsid.1.en.html>, and tell me why we
still need nohup when we have setsid?
Did you notice that this is comp.unix.shell, not comp.linux.shell?
You might use nohup when you're on a system that isn't Linux.
nohup is described in POSIX (and on GNU/Linux systems, it comes from
GNU Coreutils) whereas setsid (the command) is something from util-linux.
$ setsid
-bash: setsid: command not found
$ uname -a
Darwin m1box.example.net 21.6.0 Darwin Kernel Version 21.6.0: Mon Aug
22 20:20:05 PDT 2022; root:xnu-8020.140.49~2/RELEASE_ARM64_T8101 arm64
$ nohup
usage: nohup [--] utility [arguments]
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca