This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients benjamin.peterson, exarkun, gregory.p.smith, jcea, loewis, marcin.bachry, neologix, pitrou, python-dev, schmichael, skrah, spiv, tseaver, vstinner
Date 2011-05-31.18:48:53
SpamBayes Score 2.7836261e-08
Marked as misclassified No
Message-id <BANLkTimpSSOFirqxqx17BcTtDW_VfBjeEw@mail.gmail.com>
In-reply-to <1306512320.89.0.122181363068.issue8407@psf.upfronthosting.co.za>
Content
> The wakeup fd now contains the number of each signal, and so the behaviour has
> to change. I applied your patch and I added a test.

Interesting. I suspected this would have an impact on the test_signal
failure on the FreeBSD 6.4 buidbot:

"""
======================================================================
FAIL: test_signum (test.test_signal.WakeupSignalTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py",
line 272, in test_signum
    self.check_signum(signal.SIGUSR1, signal.SIGALRM)
  File "/usr/home/db3l/buildarea/3.x.bolen-freebsd/build/Lib/test/test_signal.py",
line 238, in check_signum
    self.assertEqual(raised, signals)
AssertionError: Tuples differ: (14, 30) != (30, 14)

First differing element 0:
14
30

- (14, 30)
+ (30, 14)
"""

This means that the signals are not delivered in order.
Normally, pending signals are checked upon return to user-space, so
trip_signal should be called when the kill syscall returns, so signal
numbers should be written in order to the wakeup FD (and here it looks
like the lowest-numbered signal is delivered first).
You could try adding a short sleep before the second kill (or just
pass unordered=True to check_signum, but in that case we don't check
the correct ordering).
History
Date User Action Args
2011-05-31 18:48:55neologixsetrecipients: + neologix, loewis, gregory.p.smith, jcea, spiv, exarkun, tseaver, pitrou, vstinner, benjamin.peterson, marcin.bachry, schmichael, skrah, python-dev
2011-05-31 18:48:54neologixlinkissue8407 messages
2011-05-31 18:48:53neologixcreate