Re: Should this work?: (&(begin(wait....

Martin Gasbichler <[email protected]> Fri, 30 Sep 2005 22:26:25 +0200
Newsgroups gmane.lisp.scheme.scsh
Message-ID <[email protected]>
[email protected] writes:

> I am using version: Welcome to scsh 0.6.5 (0.6.6)
>
> I don't understand what is happening here, if anyone can provide insight it
> would be greatly appreciated.
>
> I wrote this code (below is a fragment)
>
>      (& (begin
>            (displayn+ "Module: " module-name " is waiting for " wait-list)
>            (map wait wait-list)
>            (displayn+ "Module: " module-name " is finished waiting ")
>
> wait-list is a list of scsh process id objects.  The intent here is to
> create a process that waits for a bunch of processes to exit and then
> continues with some steps.  The wait hangs forever above.

WAIT can only wait for children of the current process. As you are
creating a new process, the processes in wait-list are no longer the
children of the current process (but siblings of it).

I don't know your specific reason for starting a new process but maybe
spawning a thread is also an option.

-- 
Martin