Re: fork/exec patch - Mailing list pgsql-patches

From Dennis Bjorklund
Subject Re: fork/exec patch
Date
Msg-id Pine.LNX.4.44.0312142329580.10157-100000@zigo.dhs.org
Whole thread Raw
In response to Re: fork/exec patch  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-patches
On Sun, 14 Dec 2003, Bruce Momjian wrote:

> > Why not use an anonymous pipe to send data from the parent to the child
> > process?
>
> Doesn't that require the postmaster to stay around to feed that
> information into the pipe or can the postmaster just shove the data and
> continue on, and how do the old pipes get cleaned up?

I think that one can just output the data and close that end of the pipe.
But i've not looked at win32 the last 5 years or so, I could be wrong.

> Seems messy.

Maybe, but to me the solution where you write to files are much more ugly.
If one does not like pipes, there are other ipc mechanisms that does not
involve creating, reading and deleting a file on each connect.

Does windows have a temp filesystem where the temp files are not actually
written out on disk? It's still ugly but better then hitting a disk all
the time.

>  Also has to work on Unix too for testing.

Everything can not work in unix, CreateProcess() and fork() are different.
However, the pipe solution can be mimiced in unix, but it will not be the
same code since the api's are different. So that does not give much.

--
/Dennis


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: fork/exec patch
Next
From: Claudio Natoli
Date:
Subject: Re: fork/exec patch