Mailinglist Archive: opensuse (1540 mails)
| < Previous | Next > |
Re: [opensuse] Script to check interface & restart network service
- From: Tejas Guruswamy <masterpatricko@xxxxxxxxx>
- Date: Sat, 13 Feb 2010 08:58:44 +0000
- Message-id: <4B7669C4.7030301@xxxxxxxxx>
On 13/02/10 05:23, David C. Rankin wrote:
" 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 the Base
Definitions volume of IEEE Std 1003.1-2001, Chapter 13, Headers; 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.
" (emphasis mine)
Accepting SIG* is not guaranteed, if it works it's an extension
Here's an example from the same man page
"trap - INT QUIT TERM EXIT"
Regards,
Tejas
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
On 02/11/2010 03:16 AM, Tejas Guruswamy wrote:man trap:
Basically it should look like thisTejas,
trap cleanup INT TERM EXIT
That's not correct, see 'man 7 signal'
" 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 the Base
Definitions volume of IEEE Std 1003.1-2001, Chapter 13, Headers; 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.
" (emphasis mine)
Accepting SIG* is not guaranteed, if it works it's an extension
Here's an example from the same man page
"trap - INT QUIT TERM EXIT"
Regards,
Tejas
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |