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: 12 Sep 1996 21:41:25 -0400
Organization: Artificial Intelligence Lab, MIT
Reply-to: shivers@ai.mit.edu
   From: rthappe@mathematik.uni-freiburg.DE (Rolf-Thomas Happe)
   Newsgroups: comp.lang.scheme.scsh
   Date: 12 Sep 1996 18:27:19 -0400

   The function autoreap-policy apparently hasn't read the manual 
   (draft Nov 1, 1995 - 15:58, section 3.4.1). Respectively, the 
   manual should point out, that the policy id has to be wrapped
   in a list: (autoreap-policy #f) does not change the policy,
   (autoreap-policy '(#f)) does, (autoreap-policy '()) works, 
   (autoreap-policy) causes an error (wrong number of arguments). 
   The definition in procobjs.scm  actually says

           (define (autoreap-policy  maybe-policy) ...
                                  ****

Yes -- I left out a dot. This:
        (define (autoreap-policy maybe-policy)
should be this:
        (define (autoreap-policy . maybe-policy)

So AUTOREAP-POLICY's optional arg wasn't. I have fixed the sources;
it'll be in the next release, due out sometime before the turn of the
century.

Thank you for the bug report.

   The policy 'late documented in section 3.4.1 isn't supported.

You aren't going to get 'late until we switch to a release of s48
that has gc finalisation.

   BTW, the zombie generated by 

           (read (run/port (cat) (< schmonzes.scm)))

   survives an explicit ,collect (with 'early autoreaping). While the 
   above line is not meant to make much sense, it would be nice if one 
   could perform similar operations without having to bother about 
   process reaping, just as one can (run (ps)) and don't care for 
   the undead.

This is as-documented in the manual -- in the current release, early reaping
happens at the next wait call (which could be your next (RUN ...) form).

The version of scsh on which I am working has signal handlers,
so I can now do *very* aggressive autoreaping by using the SIGCHLD
signal to trigger reaping, so as soon as the process dies, scsh will
scarf it up. 

We'll get the new system out to you as soon as we can.
        -Olin

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