jed update & ksh attempt

Sergey Okhapkin sos@prospect.com.ru
Mon Jun 16 00:34:00 GMT 1997


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
"gnu-win32-request@cygnus.com" with one line of text: "help".


More information about the Cygwin mailing list

AltStyle によって変換されたページ (->オリジナル) /