[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: LYNX-DEV signal handling
From: |
T.E.Dickey |
Subject: |
Re: LYNX-DEV signal handling |
Date: |
Mon, 17 Feb 1997 08:19:04 -0500 (EST) |
(too many)
> Many places in the code have sequences similar to this:
>
> (void) signal(SIGHUP, SIG_DFL);
> (void) signal(SIGTERM, SIG_DFL);
> #ifndef VMS
> (void) signal(SIGINT, SIG_DFL);
> #endif /* !VMS */
> #ifdef SIGTSTP
> if (no_suspend)
> (void) signal(SIGTSTP, SIG_DFL);
> #endif /* SIGTSTP */
> exit(-1);
I'd prefer _not_ using exit(-1), since it's not POSIX. (Use only EXIT_SUCCESS
or EXIT_FAILURE).
> Under all Unix systems with which I am familiar, this sequence should be
> unnecessary. If a process is exiting, it is committed to doing so; no
> special signal processing should be necessary.
some (?) implementors are doing buffer allocation in exit(); there is the
possibility that this will fail (or the process may get hung). I have a hunch
that this code addresses a problem on some system where it happened to bite
someone.
--
Thomas E. Dickey
address@hidden
http://www.clark.net/pub/dickey
;
; To UNSUBSCRIBE: Send a mail message to address@hidden
; with "unsubscribe lynx-dev" (without the
; quotation marks) on a line by itself.
;