This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #14782] Do not enable asynchronous cancelation in system
- From: Rich Felker <dalias at aerifal dot cx>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: libc-alpha at sourceware dot org
- Date: Sun, 12 Jan 2014 10:28:39 -0500
- Subject: Re: [PATCH][BZ #14782] Do not enable asynchronous cancelation in system
- Authentication-results: sourceware.org; auth=none
- References: <20140112121310 dot GA28961 at domone dot podge>
On Sun, Jan 12, 2014 at 01:13:10PM +0100, OndÅej BÃlka wrote:
> Hi,
>
> When looking bugs another relatively easy one is that we do not need to
> enable async cancellation in system.
>
> We use cancellation to kill child process and we do not need enable
> cancellation until we install handlers to kill a child process. A
> cancellation needs to be only enabled in waidpid which already does
> that.
>
> OK for 2.20?
>
> * sysdeps/posix/system.c (__libc_system): Do not enable
> asynchronous cancellation.
>
> diff --git a/sysdeps/posix/system.c b/sysdeps/posix/system.c
> index de71e6b..e8b921f 100644
> --- a/sysdeps/posix/system.c
> +++ b/sysdeps/posix/system.c
> @@ -181,15 +181,6 @@ __libc_system (const char *line)
> not be available after a chroot(), for example. */
> return do_system ("exit 0") == 0;
>
> - if (SINGLE_THREAD_P)
> - return do_system (line);
> -
> - int oldtype = LIBC_CANCEL_ASYNC ();
> -
> - int result = do_system (line);
> -
> - LIBC_CANCEL_RESET (oldtype);
> -
> - return result;
> + return do_system (line);
> }
> weak_alias (__libc_system, system)
IIRC I submitted this same patch and it was on hold for some silly
reason like lack of assignment (I don't see how you can need an
assignment for a patch that just removes code) or missing ChangeLog...
In any case I'd be happy to see you commit your version.
Rich