Subject: bug#14569: 24.3.50; bootstrap fails on Cygwin

From: Ken Brown <[email-masked]>
Date: Fri, 28 Jun 2013 11:29:23 -0400

On 6/28/2013 10:50 AM, Paul Eggert wrote:
> On 06/28/2013 05:20 AM, Ken Brown wrote:
>
>>   #ifndef CANNOT_DUMP
>> +#ifdef CYGWIN
>> +  if (! noninteractive)
>> +#else
>>     if (! noninteractive || initialized)
>>   #endif
>> +#endif
>
> I'm dubious about this proposal.
>
> If there's an obscure race-condition bug during bootstrapping
> that makes Emacs crash, why isn't it plausible that a similar
> bug could occur during normal operation?  Bootstrapping is
> a more-intense activity that could well be more likely to
> trigger races, but isn't it more plausible that the races
> could occur at any time?

I don't know, because I don't know when the race during bootstrapping 
was happening.  If it was happening when emacs was doing the tickling 
(in init_process_emacs), then my suggested change could conceivably 
cause emacs to crash immediately after startup.  Assuming this doesn't 
happen often, I think it's better than having bugs in subprocess handling.

On the other hand, if the race happens when emacs *executes* the glib 
handler (stored in lib_child_handler), then I agree with you that my 
proposal is unacceptable.

I would suggest that we try my proposal but leave the bug open while we 
see how it works.  If people start seeing random crashes, then we'll 
know it was a bad idea and we can revert it.

Ken