Messages in this thread | | | Date | Sun, 28 Nov 2004 21:02:15 -0800 (PST) | From | Richard Patterson <> | Subject | Re: Seekable pipes |
| |
Jan,
> > I want to implement an interface for seekable pipes > > (and FIFOs) in the Linux kernel.
> Why not simply create two pipes, and use one for the > data (from writer to reader) and the other for > control (r->w)? Then you would not need to poke > with the kernel after all.
The idea is that the reading side dosen't know it's a pipe -- thus this interface can be used to provide file-like access to non-filesystem objects like HTTP files or Postgres large objects. With kernel support, the reading side can be unaware that it is reading from a pipe -- it just seeks. So you can do wierd things like wget http://stuff/stuff.pdf | xpdf /dev/stdin -- even though xpdf doesn't support piped input.
However, Chris Siebenmann pointed out that a file descriptor can be passed to other processes with fork() or domain sockets -- thus the writer side of the pipe would have to support multiple readers with distinct positions. Which is a lot hairer than the interface I outlined earlier.
Cheers,
--Ian Turner
__________________________________ Do you Yahoo!? Take Yahoo! Mail with you! Get it on your mobile phone. http://mobile.yahoo.com/maildemo - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |