[SCore-users] sleep or signal problems

Atsushi HORI hori at swimmy-soft.com
Wed Oct 9 10:20:48 JST 2002


Hi.

>it, I found that is -1, which indicates an error, the error being 
>(surprise! surprise!) ECHILD which indicates (if I interpret the 
>description correctly) that there was actually NO child that sent that 
>signal. This is actually what I expected, as there was no child process 
>created at that point! So, I tried and succeeded in reproducing the 
>problem with a simple non-MPI program:

Aha, now I understand your problem (a little bit).

SCore runtime library forks (actually clone) another process which is 
to have the same memory space. We call this process "shadow process." 
We need this shadow process to avoid a race condition where Myrinet 
DMA might destroy the memory region that belonged to user process 
which has just terminated.

So, the wait() function in your code returns when the closed shadow 
process stops because of SIGSTOP. At this point, you may ask why it 
retunrs the PID of the shadow process. I tried but it does not return 
the PID of the shadow process, and I do not why. You may ignore the 
cloned process status by using the waitpid(2) system call with a 
option described in the man pages. I also tried this, but it does not 
work as the man page said. 

----
Atsushi HORI
Swimmy Software, Inc.




More information about the SCore-users mailing list