EOF with pipes.

dedwards%usc-isi at sri-unix.UUCP dedwards%usc-isi at sri-unix.UUCP
Fri Mar 9 23:44:00 AEST 1984


From:  Howard S. Weiss <dedwards at usc-isi>

It was done years ago on V6 at RAND - in fact here is a manual page:



EOFP(II)                  8-March-1977                   EOFP(II)



NAME
     eofp - write an end-of-file on a pipe

SYNOPSIS
     eofp(fd);

DESCRIPTION
     The pipe I/O routines have been  modified  to  allow  single
     end-of-files  to be transmitted. It works as follows: a call
     to eofp guarantees that, after the real data  is  read,  the
     next read on the pipe will return with 0 characters. Further
     writes may be done after writing an EOF, but  they  will  be
     suspended until the EOF actually gets read.

SEE ALSO
     pipe (II)

BUGS
     Writing  0  characters  on  a  pipe  now  has  very  special
     meaning--one's  code should be checked to see that it disal-
     lows all writes of 0 characters unless really desired.




-------



More information about the Comp.unix.wizards mailing list