scsh-users
[Top] [All Lists]

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

To: scsh-users@scsh.net
Subject: Should this work?: (&(begin(wait....
From: ribe@ti.com
Date: Tue, 27 Sep 2005 20:16:31 +0200 (CEST)
List-id: <scsh-users.list-id.scsh.net>
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.

Example of an output from When I run the code:
   Started compile of module: ipgenericrrbocp   Process ID: 7435
   Module: ipgenericrrbocp is waiting for (#{proc 7157 #t})

This output should, but does not, occur after the process being waited on
ends:
   Module: ipgenericrrbocp is finished waiting

I can manualy execute the wait in the repl and it works OK, so it seems to
be the fact that the wait occurs inside the forked process that causes the
problem.  Should the wait inside the forked process work?

I can change the code like this and the wait does not hang forever, it just
waits for all the processes as expected, except this is not the program
functionality that I need:
        (begin
           (displayn+ "Module: " module-name " is waiting for " wait-list)
           (map wait wait-list)
           (displayn+ "Module: " module-name " is finished waiting ")

Thanks,
John Ribe scsh@ribe.mailshell.com


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