I'm using c language in Linux. I have set up code to create a bidirection pipe between a child process and a parent process. I'm able us the pipe for bidirectional communication. However, I'm supposed to use the pid, process id, of the child process in order to send an EOF to the child process and thus close the pipe used to send input to the child process. This is supposed to be done with just the pid, from within the parent process. Do I have a way to do this? I've been looking around and I haven't figured this out.
I'm using the functions pipe(), fork(), execl(), etc. for this program.
Additionally, it's for a command shell: execl("/bin/sh", "sh", "-c", command, NULL);
This might be my clue.
Thanks for any help!
...John