Seekable pipes
A message that is not in the archive (sent off-list or not yet received): [email protected]
Jan,
Quoted 1 line
Quoted 1 line
I want to implement an interface for seekable
pipes
Quoted 6 lines
Quoted 1 line
(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