[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: the exquisite pain of signal handling in shell scripts
From: |
Ralph Corderoy |
Subject: |
Re: the exquisite pain of signal handling in shell scripts |
Date: |
Sat, 02 May 2020 10:07:20 +0100 |
Hi Branden,
> It seems like the main difference between our signal handlers is that
> you do not reset the handler, and rely on exiting with a status
> greater than 127 to notify the shell that the process was killed with
> a signal. I'm not sure that is reliable, or supposed to be.
Do you mean distinguish these two cases from a shell script using `$?'?
$ sh -c 'kill $$'; echo $?
Terminated
143
$ sh -c 'exit 143'; echo $?
143
$
--
Cheers, Ralph.
- Re: the exquisite pain of signal handling in shell scripts,
Ralph Corderoy <=