Sujet : Re: nohup Versus setsid
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.unix.shellDate : 13. Sep 2024, 02:44:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc05dj$kvsf$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 13.09.2024 01:13, Lawrence D'Oliveiro wrote:
On Thu, 12 Sep 2024 23:07:07 -0000 (UTC), vallor wrote:
On Thu, 12 Sep 2024 22:02:10 -0000 (UTC), Lawrence D'Oliveiro wrote:
>
The effect is supposed to be the same: spawn a background task that
will continue running after you log out.
>
That's not the only thing that the (POSIX) nohup(1) tool does.
>
Then I can watch for status without flooding the terminal:
But then, you cannot do more than one nohup invocation at a time, if one
is already writing to nohup.out.
If it's only the output file that is an issue I seem to recall that
there's a way to write to a different file (unless it's appended to
nohup). A long time passed that I used nohup - I thought there was
an option to define the output file - but if I inspect the specs it
seems that redirection of stdin suffices to choose arbitrary files.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/nohup.html(Did I misread the POSIX specs?)
With setsid, I just specify an output log file for each invocation, and I
can tail that in the usual way, same as you do.
Janis