bug-gnulib
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] addition: wait-process.h, wait-process.c


From: Bruno Haible
Subject: Re: [Bug-gnulib] addition: wait-process.h, wait-process.c
Date: Tue, 30 Sep 2003 13:33:13 +0200
User-agent: KMail/1.5

Paul Eggert wrote:
> >   - Is this complicated subprocess killing round necessary at all?
> >     IMO, the subprocess is killed anyway a short time after the main
> >     process, simply because it produces output, and writing to a closed
> >     pipe kills the writer process. So is it just bloat in sdiff, or
> >     a flaw in the pipe*.c functions in GNU gettext?
>
> Perhaps neither.  I was worried about the case where 'diff' is not
> producing output, either because it's a big diff and is CPU-bound, or
> perhaps because it's reading from a pipe or a device that is waiting
> for something.

I see. So this was mainly needed because the 'diff' subprocess ignores
SIGINT, but you want it nevertheless to exit as soon as the 'sdiff' process
exits? All other termination signals (like SIGHUP) are sent to the main
process and the subprocess in the same way, so there should be no problems
with them.

> >   - sdiff.c also does a lot of other signal handling stuff. Is this
> >     useful in general?
>
> It might be useful for other sdiff-like applications,
> i.e. applications that interact with the user and invoke subprograms.

OK, this sounds like 'sdiff' is particularly special for its own reasons.

So I'll commit the wait-process module without caring about 'sdiff', and
we'll see how the forking/subprocess requirements of other programs are.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]