Re: Cleaning up background processes

Liste des GroupesRevenir à cu shell 
Sujet : Re: Cleaning up background processes
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shell
Date : 11. May 2024, 20:24:37
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <v1ogll$rrf5$1@news.xmission.com>
References : 1 2 3 4
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <slrnv3v0m5.17e3.naddy@lorvorc.mips.inka.de>,
Christian Weisgerber  <naddy@mips.inka.de> wrote:
On 2024-05-08, vallor <vallor@cultnix.org> wrote:
>
I'm sorry, but I've waited and nobody said anything, so
I have to ask:  Why couldn't you trap "kill -1 0" INT?
>
There is the cosmetic problem that you'll get termination notices
referring to the new signal ("Hangup"), so I'll go with the less
confusing
>
       trap "kill -TERM 0" INT
>
but yes, it may be as simple as that.  Let me run some tests...

I don't get it.  Is there any significant difference between hitting it with
TERM vs. HUP?  I think either/both will generate the message to which you
allude.

Anyway, to answer the "Can't you just...?" question posed earlier, the
answer is there really is no general answer - one that will work in all
cases, all the time.  Answering the overall thread question is also both
shell- and OS- specific. 

Personally, I'd be happy to have a good, solid solution that was both Linux-
and bash-specific, but it sounds like OP is (unfortunately) running some
version of BSD.

I will expand on this further in my next post.

--

    "This ain't my first time at the rodeo"

is a line from the movie, Mommie Dearest, said by Joan Crawford at a board meeting.

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