Re: Operations permitted on a pipe

Wakko Warner (wakko@animx.eu.org)
Mon, 20 Sep 1999 14:08:30 -0400


> I'd like to know which file operations are permitted on a pipe created
> by the corresponding system call: Is it possible (and legal) to get the
> number of bytes in the pipe using lseek and is there a way to peek into
> the pipe? Is the pipe disposed when one of the two handles is closed,
> and what is the state of the other handle then?

I'd like to know if a program can create a pipe (well duh <g>) and listen on
it to write out some data, close it and re-open it (and do the same thing
all over again). When I opened a pipe in non-block mode, I couldn't write
to it and it would always be ready for write.

To your question, I don't believe you can lseek it or anything, IIRC, it
acts like a set of descriptors you get when using pipe(2) except it is
opened instead of using pipe.

-- 
 Lab tests show that use of micro$oft causes cancer in lab animals

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/