Date: Wed, 3 Jul 1996 12:19:35 -0400
From: "Emergent Technologies Inc." <emergent@reality.ai.mit.edu>
(run/sexp (| (zcat "/logs/access_log.june.96.gz")
(awk "BEGIN { BYTE_COUNT = 0 }
/[0-9]+$/ { BYTE_COUNT += $NF }
END { print BYTE_COUNT}")))
returns the right number and leaves a zombie awk in
the process table.
The problem here is that scsh currently doesn't do very agressive
zombie reaping, even when the policy is 'EARLY. I will fix this
in a later release, once I have signal handlers (the real fix requires
putting a zombie-reaper on a SIGCHLD handler).
It would probably also be helpful to reap zombies at gc points. Alas,
S48 0.36 doesn't have these kinds of GC hooks. Later releases do, but
by the time we port to them, we'll have signal handlers, and can use
the better solution outlined above.
In any event, this problem is still pretty easy to handle: insert a
(REAP-ZOMBIES) call into your code at points when you want your program
to sweep up.
-Olin
|