printf("Child Pid %d just read this: `%s'\n", getmypid(), rtrim($line));
socket_close($reader); // this will happen anyway
exit(0);
}
This is so simple, a child could do it. To communicate in both directions, you can simply not close the pipe that sends data from the child to the parent until the child is finished (after the pcntl_waitpid).
Thanks again, digital-ether. By the way, how do I mark this thread as solved?
Hoppy
Last edited by hopalongcassidy; Nov 20th, 2008 at 3:27 pm. Reason: Solved
printf("Child Pid %d just read this: `%s'\n", getmypid(), rtrim($line));
socket_close($reader); // this will happen anyway
exit(0);
}
This is so simple, a child could do it. To communicate in both directions, you can simply not close the pipe that sends data from the child to the parent until the child is finished (after the pcntl_waitpid).
Thanks again, digital-ether. By the way, how do I mark this thread as solved?
Hoppy
Glad that worked for you.
Right at the bottom of the thread, beside the "reply" button you should see the link to mark the thread as solved.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.