Re: Cleaning up background processes

Liste des GroupesRevenir à cu shell 
Sujet : Re: Cleaning up background processes
De : geoff (at) *nospam* clare.See-My-Signature.invalid (Geoff Clare)
Groupes : comp.unix.shell
Date : 10. May 2024, 13:35:37
Autres entêtes
Message-ID : <ptg1hk-7n3.ln1@ID-313840.user.individual.net>
References : 1 2 3 4 5
User-Agent : Pan/0.154 (Izium; 517acf4)
Janis Papanagnou wrote:

But the pseudo-signal 'EXIT' is non-standard (to my knowledge), so you
cannot generally rely on it, depending on your environment, and the OP
asked for a "standard POSIX shell idiom".

Quoting POSIX.2-1992, 3.14.13:

    The condition can be EXIT; 0 (equivalent to EXIT); or a signal
    specified using a symbolic name, without the SIG prefix, as listed
    in Required Signals and Job Control Signals (Table 3-1 and Table 3-2
    in POSIX.1 {8}). (For example: HUP, INT, QUIT, TERM). Setting a
    trap for SIGKILL or SIGSTOP produces undefined results.

It has hardly changed in the current standard (POSIX.1-2017):

    The condition can be EXIT, 0 (equivalent to EXIT), or a signal
    specified using a symbolic name, without the SIG prefix, as listed
    in the tables of signal names in the <signal.h> header defined in
    XBD Chapter 13; for example, HUP, INT, QUIT, TERM. Implementations
    may permit names with the SIG prefix or ignore case in signal
    names as an extension. Setting a trap for SIGKILL or SIGSTOP
    produces undefined results.

--
Geoff Clare <netnews@gclare.org.uk>

Date Sujet#  Auteur
5 May 24 * Cleaning up background processes17Christian Weisgerber
5 May 24 +- Re: Cleaning up background processes1Lawrence D'Oliveiro
5 May 24 +- Re: Cleaning up background processes1Christian Weisgerber
6 May 24 +- Re: Cleaning up background processes1vallor
6 May 24 `* Re: Cleaning up background processes13Kaz Kylheku
6 May 24  `* Re: Cleaning up background processes12Kenny McCormack
8 May 24   +* Re: Cleaning up background processes9vallor
9 May 24   i+* Re: Cleaning up background processes4Janis Papanagnou
10 May 24   ii`* Re: Cleaning up background processes3Geoff Clare
10 May 24   ii `* Re: Cleaning up background processes2Janis Papanagnou
19 May 24   ii  `- Re: Cleaning up background processes1Martijn Dekker
11 May 24   i`* Re: Cleaning up background processes4Christian Weisgerber
11 May 24   i `* Re: Cleaning up background processes3Kenny McCormack
12 May 24   i  `* Re: Cleaning up background processes2Christian Weisgerber
13 May 24   i   `- Re: Cleaning up background processes1Geoff Clare
11 May 24   `* Re: Cleaning up background processes2Christian Weisgerber
11 May 24    `- Re: Cleaning up background processes1Kenny McCormack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal