[LCP]Fork freezes when forking more then one

juman juman at chello.se
Tue Aug 26 21:38:02 UTC 2003


On Mon, Aug 25, 2003 at 08:31:18PM -0500, Steve Baker wrote:
>   This took me a while.  Strace and /proc are your friends in this case.  With
> strace I could see that it the children were still stuck reading from stdin.
> With /proc I could see that the second child spawned had the descriptors for
> the first child spawned, thus holding it's stdin open even after the parent
> had closed it.  This immediately explains why it worked when you closed the
> second job first, since it would then finally close the stdin on the first
> child once the second one had exited.

Great... now I also see the problem and learned to use a new tool for me
(strace) but I am not sure how you used the /proc to see the
information. Could explain a bit more how you see the used descriptors
using /proc?

Thank you very much for helping me solve this...

Regards,

juman



More information about the linuxCprogramming mailing list