Subject: Re: bug#22622: 24.5; ask-user-about-supersession-threat causes emacs -batch to hang

From: Eli Zaretskii <[email-masked]>
Date: Sat, 13 Feb 2016 15:42:55 +0200

> From: Richard Sharman <[email-masked]>
> Date: Wed, 10 Feb 2016 18:27:30 +0000
> Cc: Richard Sharman <[email-masked]>
> 
> I'm not sure if this is a bug or not. 
> 
> When running emacs -batch, if a function modifies a buffer and calls
> save-buffer and there is another emacs -batch also updating the same
> file, one of them can call ask-user-about-supersession-threat [in
> userlock.el].
> 
> This causes the emacs process to hang because read-char-choice never
> returns. See traceback below.
> 
> This happened when running make -j 6 and I changed the scenario to not
> happen, but I wondered if ask-user-about-supersession-threat should be
> act upon variable noninteractive.
> 
> Perhaps one is supposed to supply a replacement for
> ask-user-about-supersession-threat if running emacs in batch mode? 

Does anyone see a problem with automatically answering NO to that
question in batch mode?