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: Fri, 26 Sep 2003 18:17:02 +0200
User-agent: KMail/1.5

Paul Eggert wrote back on April 23:
> Also, some programs need to run code if waitpid fails with errno ==
> EINTR.

whereupon I replied:

> If waitpid fails with errno == EINTR, a signal handler was run. The
> program can run its code from within the signal handler, can't it?
> Specifically, diffutils' checksigs() could call exit (EXIT_TROUBLE)
> after longjmping back to main, no?
>
> Or do you mean, the wait_subprocess function really needs to take an
> additional argument
>           void (*eintr_hook) (void)  ?

So what's the general opinion on this? Do we have to add an argument

            void (*eintr_hook) (void)

to all functions which retry a system call when they see EINTR
(this includes safe_read(), safe_write(), full_read(), full_write(),
wait_subprocess(), execute(), ...)? Or can we just assume that anyone
who needs to handle EINTR already does all the job in his signal handler?

Bruno





reply via email to

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