diff -r f2d955afad8a Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sat Aug 17 21:43:47 2013 +0200 +++ b/Lib/test/test_signal.py Sun Aug 18 08:15:49 2013 +0800 @@ -305,7 +305,8 @@ except ZeroDivisionError: # An ignored exception should have been printed out on stderr err = err.getvalue() - if ('Exception ignored when trying to write to the signal wakeup fd' + if ('Exception ignored when trying to write to the signal ' + 'wakeup fd: %d' % errno.EBADF not in err): raise AssertionError(err) if ('OSError: [Errno %d]' % errno.EBADF) not in err: diff -r f2d955afad8a Modules/signalmodule.c --- a/Modules/signalmodule.c Sat Aug 17 21:43:47 2013 +0200 +++ b/Modules/signalmodule.c Sun Aug 18 08:15:49 2013 +0800 @@ -182,7 +182,7 @@ errno = (int) (Py_intptr_t) data; PyErr_SetFromErrno(PyExc_OSError); PySys_WriteStderr("Exception ignored when trying to write to the " - "signal wakeup fd:\n"); + "signal wakeup fd: %d\n", errno); PyErr_WriteUnraisable(NULL); errno = save_errno; return 0;