From: marcus AT bighorn DOT dr DOT lucent DOT com Subject: Re: Possible Bug in Pipes with Win95 28 Oct 1997 13:03:02 -0800 Message-ID: <199710281615.JAA26876.cygnus.gnu-win32@chorus.dr.lucent.com> To: gnu-win32 AT cygnus DOT com, widsith AT panix DOT com First off, there is a problem in the logic of your test program. ... /* Create the pipe. */ status = pipe (mypipe); if (status) { fprintf (stderr, "Pipe failed.\n"); return EXIT_FAILURE; } /* Create the child process. */ pid = fork (); if (pid == (pid_t) 0) { /* This is the child process. */ read_from_pipe (mypipe[0]); fprintf(stdout, "Child: Exiting. . . "); exit(EXIT_SUCCESS); } ... The pipe is created, then fork() is called. At this point, both processes have a copy of the read end and write ends of the pipe. Now, the child starts reading from the read end of the pipe and waits for EOF. Note that EOF occurs when all writers have closed the pipe and both the parent and child process have a write end open, so the child should never see EOF until it closes its write end of the pipe, which it never does. Also, just a minor style point here, I would never call a file descriptor "file", since a stream is of type FILE *. Traditionally, it is "fd" or something else ending in "d". Not that it really makes any difference for functionality, but just for readability by other Unix types.. marcus hall - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".