lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV signal handling


From: Foteos Macrides
Subject: Re: LYNX-DEV signal handling
Date: Mon, 17 Feb 1997 11:03:05 -0500 (EST)

"T.E.Dickey" <address@hidden> wrote:
>(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.

        exit() is a macro in Lynx which invokes a great deal of additional
code.  SIGINT is used on VMS, despite the inference Bela drew from those
code snippets.  The signal and exit handling in Lynx are very complex,
too complex to explain in an email message.  It might be a good idea if
both of you built a debug version and walked through all that is happened
before modifying any of it based on inspections of snippets.

                                Fote

=========================================================================
 Foteos Macrides            Worcester Foundation for Biomedical Research
 address@hidden         222 Maple Avenue, Shrewsbury, MA 01545
=========================================================================
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]