[PATCH 1 of 2 STABLE] worker: be silent if killed by the main process

Jun Wu quark at fb.com
Fri Apr 21 12:06:44 EDT 2017


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().

> 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.


More information about the Mercurial-devel mailing list