[PATCH 1 of 2 STABLE] worker: be silent if killed by the main process
Yuya Nishihara
yuya at tcha.org
Fri Apr 21 23:18:52 EDT 2017
On Fri, 21 Apr 2017 09:06:44 -0700, Jun Wu wrote:
> Excerpts from Yuya Nishihara's message of 2017-04-21 20:43:48 +0900:
> > Can't we simply move the SignalInterrupt handling to dispatch?
> > SignalInterrupt is a sub-type of KeyboardInterrupt, so it doesn't make
> > sense to handle only SignalInterrupt in scmutil.callcatch().
>
> Signal could arrive before scmutil.callcatch, just after os.fork().
Yeah, maybe that's why SIGINT is temporarily masked.
> > I noticed "interrupted!" message isn't printed when worker is involved,
> > but that is a minor issue we don't have to fix in the stable release.
>
> The test fails constantly in our CI. But I can send V2 after freeze.
>
> > > Besides, it's hard to predicate how many "killed!" or traceback should be
> > > printed if we keep that behavior.
> >
> > Well, too many "killed!" messages are bad, but traceback is for developers.
> > I don't think it should be suppressed just for test stability.
> >
> > The default handler of SIGTERM kills the process, which shouldn't be used.
>
> The new plan is to use SIGUSR2 to "kill" workers, SIGUSR2 handler is to do
> sys.exit. So "killed!" is removed and traceback is kept.
What's the key difference from just making SIGTERM handler silent?
More information about the Mercurial-devel
mailing list