#Detecting end of output in a pipe

14 messages · Page 1 of 1 (latest)

ocean inletBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.

worthy bronze
#

I don't see the write end being closed here

#

There's the one to close it after the fork for the reading process, but you aren't closing the write end from the writing process

mellow flower
#

execv doesn't return

#

it replaces the process

#

that wont execute

#

because of the execv thing

#

anyways, after the second fork, the parent leaves the write end of the pipe open

#

so EOF isnt triggered

#

EOF is only triggered when all the write ends are closed

mellow flower
#

it gets closed automatically after then program finishes running

#

after the other call to fork, the parent still has the write end open

#

yeah

ocean inletBOT
#

@kindred gate Has your question been resolved? If so, type !solved :)