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:
> 
> 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).
> 
> 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.
> 
> 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 calls.

Maybe the POSIX people overlooked this case, that is also possible.

>                                 Michael van Elst
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert                            <rhialto/at/falu.nl>
\X/ There is no AI. There is just someone else's work.           --I. Rose

Attachment: signature.asc
Description: PGP signature

Reply via email to