[MERGE][0.16] fix problem with SIGQUIT on win32
Alexander Belchenko
bialix at ukr.net
Wed Apr 25 05:32:49 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Martin Pool пишет:
> On 4/25/07, Alexander Belchenko <bialix at ukr.net> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> This patch fixes this problem introduced by recent patch from Martin.
>
> Sorry.
>
>> C:\Temp\win32.fixes>python bzr
>> Traceback (most recent call last):
>> File "bzr", line 77, in <module>
>> bzrlib.breakin.hook_sigquit()
>> File "C:\Temp\win32.fixes\bzrlib\breakin.py", line 41, in hook_sigquit
>> signal.signal(signal.SIGQUIT, _debug)
>> AttributeError: 'module' object has no attribute 'SIGQUIT'
>
> +1 on that, but maybe it would be better to check whether there is a
> sigquit in the signal module instead?
>
> === modified file 'bzrlib/breakin.py'
> --- bzrlib/breakin.py 2007-04-24 04:51:31 +0000
> +++ bzrlib/breakin.py 2007-04-25 04:08:49 +0000
> @@ -38,4 +38,6 @@
> # XXX: is this meaningful on Windows?
> if os.environ.get('BZR_SIGQUIT_PDB', '1') == '0':
> return
> + if getattr(signal, 'SIGQUIT', None) is None:
> + return
> signal.signal(signal.SIGQUIT, _debug)
Well, either variant is OK for me.
But documentation on signal module talk preferable about Unix.
I don't know is signal standard library could be useful at all on win32.
OK, I'll change as you suggested and merge with PQM.
[µ]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGLtnxzYr338mxwCURAr/hAJ9oYyIn6WRdFtkOalI5aV+cc9ye0ACfc5GE
fcZhE/z0I7XwBQ7XXBS9ZFs=
=wF1C
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list