scsh-users
[Top] [All Lists]

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

To: ribe@ti.com
Subject: Re: Should this work?: (&(begin(wait....
From: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Date: Fri, 30 Sep 2005 22:26:25 +0200
Cc: scsh-users@scsh.net
List-id: <scsh-users.list-id.scsh.net>
ribe@ti.com 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

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