Sujet : Re: Cleaning up background processes
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.unix.shellDate : 06. May 2024, 05:46:59
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20240505214609.114@kylheku.com>
References : 1
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2024-05-05, Christian Weisgerber <
naddy@mips.inka.de> wrote:
Is there a standard POSIX shell idiom to clean up background
processes?
>
You have a shell script that starts some background process with &.
Now you want to make sure that the background process terminates
when the shell script terminates. In particular, when it terminates
due to special circumstances.
Maybe have an EXIT trap which calls wait?
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca