vfork() problems

Stefan Bellon sbellon at sbellon.de
Thu Oct 25 11:36:40 BST 2001


Nicholas Clark <nick at ccl4.org> wrote:
> On Thu, Oct 25, 2001 at 11:03:04AM +0100, Nick Burrett wrote:

[snip]

> > I am not entirely convinced that the pipe function works properly.
> > IIRC, pipe buffers the data in temporary files in /tmp.

> My memory agrees. I think one limitation was that the implementation
> expects the writer to complete all the writing before the reader does
> any ready.

I /think/ this is enough for what will be used in GnuPG. But I'm not
sure at present. In the moment I'm reading through the source of
popen() and pclose()

> I experimented with a version that used a temporary file (in tmp) but
> effectively maintained 2 pointers on it, so that reading and writing
> could be interleaved. (Although I was only doing this in one process,
> the sfio regression tests). Would Stefan find this useful?

I'll keep that in mind. And whenever I need reading and writing
interleaved, I'll come back to you.

Another point is: How difficult would it be to use PipeFS for all pipe
operations instead of a temporary file? Concerning GnuPG, it's always
best not to store things on permanent storage if possible.

TIA.

Greetings,

Stefan.

-- 
 Stefan Bellon * <mailto:sbellon at sbellon.de> * <http://www.sbellon.de/>
 PGP 2 and OpenPGP keys available from my home page

 Better to understand a little than to misunderstand a lot.



More information about the gcc mailing list