This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] BZ #14782 system async cancellation
On Thu, Nov 01, 2012 at 01:30:30PM +0100, Andreas Schwab wrote:
> Rich Felker <dalias@aerifal.cx> writes:
>
> > On Thu, Nov 01, 2012 at 08:31:02AM +0100, Andreas Schwab wrote:
> >> Rich Felker <dalias@aerifal.cx> writes:
> >>
> >> > -/* We have to and actually can handle cancelable system(). The big
> >> > - problem: we have to kill the child process if necessary. To do
> >> > - this a cleanup handler has to be registered and is has to be able
> >> > - to find the PID of the child. The main problem is to reliable have
> >> > - the PID when needed. It is not necessary for the parent thread to
> >> > - return. It might still be in the kernel when the cancellation
> >> > - request comes. Therefore we have to use the clone() calls ability
> >> > - to have the kernel write the PID into the user-level variable. */
> >> > -#ifndef FORK
> >> > -# define FORK() \
> >> > - INLINE_SYSCALL (clone, 3, CLONE_PARENT_SETTID | SIGCHLD, 0, &pid)
> >> > -#endif
> >>
> >> What about the other uses?
> >
> > Please clarify. Did I miss something?
>
> Yes, all the other uses of FORK.
Could you please clarify. FORK does not appear anywhere else in either
of these two files except the #ifdef in sysdeps/posix/system.c, where
it's intended that the code in the #else clause be used.
Rich