Re: nohup Versus setsid

Liste des GroupesRevenir à cu shell 
Sujet : Re: nohup Versus setsid
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.unix.shell
Date : 14. Sep 2024, 00:32:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vc2eiq$12592$11@dont-email.me>
References : 1 2
User-Agent : Pan/0.160 (Toresk; )
On Fri, 13 Sep 2024 19:00:45 +0200, Helmut Waitzmann wrote:

"nohup" makes the invoked command immune to the HUP signal but lets it
remain in its terminal session, i. e. the command to be run will not
lose its controlling terminal.  Thus the other job control signals like
TSTP, INT, and QUIT sent by the terminal driver to the command may have
their effects.

See, I always thought the point of that was to allow the job to continue
after you log off. After all, what was the original meaning of the “HUP”
(hangup) signal? It meant the modem had disconnected -- the phone line had
hung up.

If, on the other hand, you use "setsid", the command to be run will not
be made immune to any of the job control signals, i. e. any job control
signal sent to the command to be run by means of the kill(2) system
call will have its effect.

That’s because setsid starts an entirely new session group, not connected
to your terminal at all. So it is not vulnerable to any of those remaining
signals from your terminal, that nohup does not block.

That’s another reason why I think setsid is better than nohup.

Date Sujet#  Auteur
12 Sep 24 * nohup Versus setsid14Lawrence D'Oliveiro
12 Sep 24 +* Re: nohup Versus setsid9Kenny McCormack
12 Sep 24 i`* Re: nohup Versus setsid8Janis Papanagnou
13 Sep 24 i `* Re: nohup Versus setsid7Lawrence D'Oliveiro
13 Sep 24 i  `* Re: nohup Versus setsid6vallor
13 Sep 24 i   +* Re: nohup Versus setsid4Lawrence D'Oliveiro
13 Sep 24 i   i`* Re: nohup Versus setsid3Janis Papanagnou
13 Sep 24 i   i `* Re: nohup Versus setsid2Helmut Waitzmann
13 Sep 24 i   i  `- Re: nohup Versus setsid1Janis Papanagnou
13 Sep 24 i   `- Re: nohup Versus setsid1Kaz Kylheku
12 Sep 24 +- Re: nohup Versus setsid1Kaz Kylheku
13 Sep 24 `* Re: nohup Versus setsid3Helmut Waitzmann
13 Sep 24  +- Re: nohup Versus setsid1Kaz Kylheku
14 Sep 24  `- Re: nohup Versus setsid1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal