scsh-users
[Top] [All Lists]

Re: autoreap-policy

To: scsh@martigny.ai.mit.edu
Subject: Re: autoreap-policy
From: shivers@ai.mit.edu (Olin Shivers)
Date: 17 Sep 1996 16:51:27 -0400
Organization: Artificial Intelligence Lab, MIT
Reply-to: shivers@ai.mit.edu
   From: rthappe@xtreme.mathematik.uni-freiburg.de (Rolf-Thomas Happe)
   Newsgroups: comp.lang.scheme.scsh
   Date: 17 Sep 1996 10:49:02 GMT
   I had read that (reap on next wait). But (with GNU Emacs 19.22, 
   Linux kernel 1.2.3) the zombies generated by run/port stay around
   whereas I couldn't observe such a behavior with processes that have
   simply been (run ...):

Think about it.
        (RUN . epf)
expands into
        (WAIT (& . epf))
So anything you do with RUN gets waited on automatically. That's the difference
between RUN and &.

RUN/PORT *doesn't* wait for the child it creates to die -- it fires up
the chile and returns the connecting port immediately, so you can overlap
your reading & processing with the child's processing & writing. When
the child dies, it will stay a zombie until the next time you either do
a wait (perhaps by executing a (RUN ...) form), or a (REAP-ZOMBIES).

As I said, now that (the currently under-development) scsh has signal
handlers, I can do better -- I can put a signal handler on the SIGCHLD
signal, and have the handler reap the zombie as soon as it dies.
        -Olin

<Prev in Thread] Current Thread [Next in Thread>