Subject: RE: jed update & ksh attempt
From: [email-masked] (Sergey Okhapkin)

16 Jun 1997 02:50:26 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Original-To: "[email-masked]" <[email-masked]>,
        "[email-masked]'"
	 <[email-masked]>
Encoding: 56 TEXT
Original-Sender: [email-masked]

Chris Faylor wrote:
> >
> >> >From the pdksh source:
> >> 	/* Make sure SIGCHLD isn't ignored - can do odd things under SYSV */
> >> 	setsig(&sigtraps[SIGCHLD], SIG_DFL, SS_RESTORE_ORIG|SS_FORCE);
> >> So my guess is in answer to your question probably yes.
> >
> >"Probably"... I need the exact answer!
>
> By the way, as far as zsh is concerned, the answer is YES.  SIGCHLD is
> definitely trapped but appears to not be raised in zsh when a child 
process
> exits.

Every cygwin's process makes "kill(ppid, SIGCHLD)" before terminating. Look 
at _exit() code in dcrt0.cc. I just tried the following code on Linux box:

#include <signal.h>

main()
{
        sigset_t mask=0;

        signal(SIGCHLD, SIG_DFL);
        for(;;) {
                sigsuspend(&mask);
                printf("Trap!\n");
        }
}

I ran this program I tried to kill it with SIGCHLD. Sigsuspend() didn't 
terminates! The following code reports about SIGCHLD delivering:

#include <signal.h>

void handler(sig)
{
        signal(SIGCHLD, handler);
}

main()
{
        sigset_t mask=0;

        signal(SIGCHLD, handler);
        for(;;) {
                sigsuspend(&mask);
                printf("Trap!\n");
        }
}

--
Sergey Okhapkin, http://www.lexa.ru/sos
Moscow, Russia
Looking for a job.

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".