wrote:
> On Aug 6, 9:47 pm, Xho Jingleheimerschmidt <xhos...@gmail.com> wrote:
>> friend...@gmail.com wrote:
>>
>>> And I check the trace(truss -p on sun). I found that sometimes one of
>>> the child goes to sleeping and parent is still waiting for that child
>>> exit status. But it never gets that bcoz child is sleeping.
>> What system call does it use to put itself to sleep? You are quite sure
>> that it reaches the "exit" before going to sleep? If it prints its
>> exiting message immediately before the exit, what do you see in the
>> strace between the "write" (or whatever system call does the actual
>> printing) and the command that puts it to sleep?
>>
>> Xho
>
> before sleeping child was trying to read something.
It actually read something, and then put itself to sleep?
Or the read itself was the thing that it was blocking (i.e. sleeping) on?
> any suggestion how can I debug exactly what child is trying to read.
I'm more used to to strace than truss. But if you you have (from the
truss) the file handle it is trying to read from, you should be able to
go back through the truss output, assuming you saved enough of it, to
see what that file handle was opened to (presumably it will not be an
ordinary file, as those tend not to block, but rather some sort of pipe
or socket).
And if that doesn't work....Since you (presumably) wrote the child code,
and haven't shared it with us, we are in a poor place to guess about
what it could be trying to read, while you should be an excellent place
to guess on that.
Xho