Re: Bonobo-Activation fun with pipes



On 24Aug2001 03:05PM (-0700), Maciej Stachowiak wrote:
> On 24Aug2001 06:05PM (-0400), Havoc Pennington wrote:
> > 
> > Maciej Stachowiak <mjs noisehavoc org> writes: 
> > > Does g_spawn let you set up pipes to or from the child process on
> > > arbitrary file descriptors?
> > 
> > The builtin pipes support uses stdout/stdin/stderr on the child side
> > and one end of the pipe from pipe() on the parent side.
> > 
> > But nothing is stopping you from doing your own pipes stuff. There's a
> > ChildSetupFunc to run arbitrary code right before the exec if
> > necessary.
> > 
> > However my reading of oaf_server_by_forking() is that it's just using
> > the standard pipe()-and-dup2(pipe[1],1) pipe that g_spawn can do for
> > you.
> 
> Actually it tries to leave stderr / stdout / stdin alone and sets up a
> pipe on a different file descriptor to communicate back the IOR (I
> think). I'll look into using g_spawn once I get the other changes
> merged over.
> 
> (It only does a dup2 when the exec fails and it needs report errors
> which is a silly and misleading way to write to the IOR fd).
> 

I forgot to mention but I guess the right thing to do is use g_spawn
at some point. I would like to merge the changes from the stable (so I
can see the errors being propagated) branch and fix the test program
(so I can see I'm not beaking anything) before I do it though.

Regards,

Maciej




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]