Re: Seekable pipes

From: Richard Patterson
Date: Mon Nov 29 2004 - 00:03:20 EST


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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/