python version-specific codepaths in tests

John Arbash Meinel john at arbash-meinel.com
Fri Nov 20 16:22:46 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gordon Tyler wrote:
> John Arbash Meinel wrote:
>>> So being able to test that "bzr: interrupted" is output to stderr on
>>> SIGINT is proof that things were cleaned up?
>>
>> Well, testing that it doesn't dump a traceback to stderr is :)
> 
> Just did a little research on signals handling in python. SIGTERM is
> apparently not as clean an exit as we may want. I'll investigate
> changing it back to SIGINT with the workaround for win32.
> 
> Ciao,
> Gordon
> 
> 

So SIGTERM == no cleanup handling. It just stops the process. SIGINT
raises an exception that unwinds the stack and lets you close handles,
delete temp files, etc. (Though it also lets you catch the exception and
refuse to exit.)

So when possible SIGINT is certainly preferred.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAksGwlYACgkQJdeBCYSNAAMBKwCgs9dFtKOIaNyt2Gm4Qyd/EHRk
3/kAoMgwHGnXQMXCavz1tg2bLJWj1mji
=GaAh
-----END PGP SIGNATURE-----



More information about the bazaar mailing list