[racket] SIGCHLD handler called in stderr

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Dec 16 12:19:47 EST 2012

At Fri, 14 Dec 2012 22:09:11 +0400, Sergey Khorev wrote:
> > I think this isn't exactly the problem you're looking for. You get
> >
> > "waitpid: No child pocesses" because Racket (with places enabled)
> > creates its own thread to reap child processes.
> >
> 
> Is it possible to make Racket not to reap child processes? Can it be done
> during its initialization or is compilation without places the only option?

Racket needs to reap child processes to implement `subprocess' (which
is used by `system', etc.). In simple cases, it could use waitpid()
with a specific process id, but Racket generally avoids that to support
operations on process groups. (I forget how it goes, exactly, but
there's an issue with using a process id and giving up the ability to
talk about a process group.)

In non-places mode, Racket avoids calling waitpid() if no subprocesses
have been started. We could improve the implementation for places so
that the thread created to call sigwait() similarly avoids doing
anything when the are no pending subprocesses. Would that be good
enough?


Posted on the users mailing list.