This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BZ #14782] Do not enable asynchronous cancelation in system


On Sun, Jan 12, 2014 at 12:37:59PM -0500, Carlos O'Donell wrote:
> On 01/12/2014 10:28 AM, Rich Felker wrote:
> > 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.
> 
> This is not quite correct.
> 
> The child process won't be killed via cancellation (ignore bug 14744 for
> now) because it's another process not a thread.
> 
> We don't use any cancellation to kill the child. The parent is the one 
> which we want to cancel.
> 
> The child won't install the SIGCANCEL handler until it runs
> __pthread_initialize_minimal_internal which may be never if it's not
> MT.

I thought there was a cancellation cleanup handler installed in the
parent that sends a termination signal to the child when cancellation
is acted upon, but I may be misremembering.

> I'm worried that Ulrich's commit 6ee8d334 was fixing something
> important that we don't know about, but without a policy of
> creating public BZs to track the user visible defect we can't
> know what was intended to be fixed. It looks like a simply
> papering over of the problem.

If I'm not mistaken, it was part of a pattern of him committing this
exact same change to a large number of functions. So I don't think
there was any particular reason for doing it to system aside from that
it fit the "pattern" he was applying.

Rich


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]