Re: Calling system(3) when SIGCHLD is SIG_IGN'd
Rhialto <[email protected]> Sun, 13 Aug 2023 15:50:45 +0200
| Newsgroups | gmane.comp.window-managers.ctwm |
|---|---|
| Message-ID | <[email protected]> |
--veeyz1E+qOS/WClt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun 13 Aug 2023 at 13:51:53 +0200, Michael van Elst wrote: > On Sun, Aug 13, 2023 at 01:04:00PM +0200, Rhialto wrote: > > I suppose that the problem was not noticed since 2018 because > > there are several preconditions: >=20 > The problem didn't exist for NetBSD before the recent ctwm update in xsrc. The change was made in ctwm in 2018 and I used it on NetBSD, pretty much always the HEAD version. > > - session startup script must start some programs in the background, and > > end with "exec ctwm". Just "ctwm" without "exec" doesn't do it. This > > is so that the started background processes become children of ctwm > > (even if ctwm didn't start them itself). >=20 > Indeed, that's the standard way to start a session. Exiting the window > manager will then also finish the session. I would say it is one of the two major ways. I end the session startup script with "exec xterm". That way you can exit the window manager (or it can crash... that can happen while developing new things) but it won't end your X session. > > - on FreeBSD (and probably Linux too) they apparently don't follow the > > described semantics of wait*(2) regarding SIGCHLD set to SIG_IGN, OR > > in system(3) they work around it somehow. Alledgedly, POSIX doesn't > > require system(3) to work in this state. >=20 > I haven't found anything that would even talk about it, but the sematics > of waitpid in this case (wait for all children to finish) seem to forbid > that system can work correctly unless it works outside of POSIX system ca= lls. Maybe the POSIX people overlooked this case, that is also possible. > Michael van Elst -Olaf. --=20 ___ Olaf 'Rhialto' Seibert <rhialto/at/falu.nl> \X/ There is no AI. There is just someone else's work. --I. Rose --veeyz1E+qOS/WClt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEFVAhiiWjqgwBVdQAmYnGRWHD+9MFAmTY37EACgkQmYnGRWHD +9MNWgf8CLp3XE1muuQRDeVbMB429CXJIc3BcFOT/eSLO9skQTMMm7vyxu+0NWPW As3eQgGf2/nJdu8u8qm8Wul+ZjUfNxuVHp7Xv8cC7MiLzHFsIW5Q29zJBissP0Y0 4noYlz7bbPO6tk+wVrNAeRcKM+KZ1Wymytfh1rb34bQxbCVJrDmbiVeMBLQvSGJj aYVRuPWwXh2g9WdNNsxdX/kBySn8MRDduiW3YU0eGETmeYohlbWOzyL21BNaiXpV fbCSm0LxS+9vnDG6tIQZt95R2tqtlE2E0XPpRL0z/evVEwc/gB6/rkvKsDTJwWvv 1FU7GNwKfDg6C+14dEBcyM9/Ysyz+g== =KfrA -----END PGP SIGNATURE----- --veeyz1E+qOS/WClt--