in reply to Re^4: close statement issue
in thread close statement issue

Looking at the documentation you were reading, I think I can understand your confusion. Closing the pipe at one end is not synonymous (or to make it clearer what is happening 'not simultaneous') with termination of the subprocess.

If a parent closes its end of a pipe and doesn't wait for the child to terminate, the subprocess can become a zombie under SunOS - I discovered waitpid for the first time during the successful process of investigating and solving the problem.

I am talking reality here, not supposition or documentation.

Update: I am not convinced by the example which does nothing with the pipe - When I have time, I'll try to reproduce the actual case with some "ps"s to show the zombies.

-M

Free your mind