Date: Sun, 10 Jun 2001 18:36:37 +0200 From: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz> To: Terry Lambert <tlambert2@mindspring.com> Cc: hackers@FreeBSD.ORG Subject: Re: [Patch?] signal(SIGCHLD, SIG_IGN) is against SUSv2 Message-ID: <20010610183637.A73238@dcse.fee.vutbr.cz> In-Reply-To: <no.id>; from tlambert2@mindspring.com on Fri, Jun 08, 2001 at 01:54:01AM -0700
next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote (2001/06/08): > > However, if I use "signal(SIGCHLD, SIG_IGN)", zombies are still > > created in FreeBSD, which is against SUSv2. I'm sorry that I used this shortening: I know that signal() is implemented via sigaction() in FreeBSD's libc so I used signal() in my description. However, just sigaction() interface is used in my test program. Ok, I repeat it once again - in the full: If I use sigemptyset(&sa.sa_mask); sa.sa_flags = 0; sa.sa_handler = SIG_IGN; sigaction(SIGCHLD, &sa, NULL); zombies are still created in FreeBSD, which is against SUSv2. My citation was quoted directly from sigaction() page and not from signal() page. Unfortunately, I do not have access to POSIX, so I do not know if it is specified in SUSv2 only or if it is specified in both SUSv2 and in POSIX. I'm afraid that it is in both. However I think, that FreeBSD wants to be SUSv2 compliant too, or not? > Look at the sigaction() man page. There is a POSIX way > to do what you want, using the sa_flags bits. I know about SA_NOCLDWAIT too, but SIG_IGN is the second way how to set up SIGCHLD handler and do not create zombies. Both ways are directly specified in SUSv2. What all says POSIX? Is it so much different from SUSv2? > If you hack up signal() to do this, it should be done > by noting the SIG_IGN and the fact you are using the > historical compatability signal() wrapper to the POSIX > interface, and just set the sa_flags bit to do the job. And why not to use the second way of the two in SUSv2 specification? It is not about (im)possibility. It is about FreeBSD's conformance to SUSv2 specification (and maybe POSIX?). -- Rudolf Cejka (cejkar@dcse.fee.vutbr.cz; http://www.fee.vutbr.cz/~cejkar) Brno University of Technology, Faculty of El. Engineering and Comp. Science Bozetechova 2, 612 66 Brno, Czech Republic To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010610183637.A73238>