[gambit-list] process-status, close-port, and zombie processes

Marc Feeley feeley at iro.umontreal.ca
Thu Sep 6 08:06:29 EDT 2007


On 5-Sep-07, at 6:15 PM, Lang Martin wrote:

> All seems to be well running interactively. However, when the process
> runs as a gsi-script, it blocks inside ##thread-sleep! in ##process-
> status. The final result is the script running at 100% of the CPU
> (polling the port, seemingly) with a dangling child process, which
> has already exitted (exat?) and is now a zombie.
>
> It seems as though once this happens, each remaining open-process
> port will block until the full timeout of process-status is reached.

To debug this problem I suggest you add a trace in function  
sigchld_signal_handler in lib/os_io.c.  What interests me is the  
values returned by the call to waitpid .  I suspect the status in  
neither WIFEXITED(status) or WIFSIGNALED(status), so the process is  
never marked as terminated.  Another problem might be that a SIGCHLD  
signal is never generated for the process.

Marc




More information about the Gambit-list mailing list