Roundup Robot devnull@devnull added the comment:
New changeset 945ca78c38b1 by Victor Stinner in branch '3.1':
Issue #12060: Use sig_atomic_t type and volatile keyword in the signal module.
http://hg.python.org/cpython/rev/945ca78c38b1
New changeset b74999f561ca by Victor Stinner in branch
STINNER Victor victor.stin...@haypocalc.com added the comment:
if someone comes up with a situation where this is a real problem,
feel free to reopen it.
Ok I agree, no problem. But I commited at least Charles's patch ;-)
--
___
Python tracker
Gregory P. Smith g...@krypto.org added the comment:
if you used the pipe approach you'd need to deal with the case of the write
blocking (or failing if nonblocking) when the pipe buffer is full. also you'd
need to block signals around a fork and reinitialize the pipe in the child
before
Charles-François Natali neolo...@free.fr added the comment:
if you used the pipe approach you'd need to deal with the case of the
write blocking (or failing if nonblocking) when the pipe buffer is full.
Well, a pipe is 64K on Linux (4K on older kernels). Given that each signal
received
Gregory P. Smith g...@krypto.org added the comment:
if someone comes up with a situation where this is a real problem, feel free to
reopen it.
--
resolution: - wont fix
status: open - closed
___
Python tracker rep...@bugs.python.org
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:
Dunno.
The patch is not completely safe.
Yeah it will not work without atomic ops.
Unfortunately the C standart seems to go into a direction
noone understands - as if a atomic_compare_and_swap() would
not suffice! Do you know
Antoine Pitrou pit...@free.fr added the comment:
Is it a theoretical concern or does it affect real software?
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12060
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Is it a theoretical concern or does it affect real software?
It's more theoretical.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12060
STINNER Victor victor.stin...@haypocalc.com added the comment:
Yeah it will not work without atomic ops.
... Or we can maybe block the signals (all signals or just one signal?) using
pthread_sigmask(SIG_BLOCK) while we access the Handlers array. But
pthread_sigmask() is not available on all
Steffen Daode Nurpmeso sdao...@googlemail.com added the comment:
On my Linux box, Python 3.3 says that signal.NSIG is equal to 65
which looks correct.
On FreeBSD NSIG only counts old signals (32, one 32 bit mask),
SIGRTMIN is 65 and SIGRTMAX is 126.
Our internal old signal.h states
*
Charles-François Natali neolo...@free.fr added the comment:
If the C signal handler is called twice, the Python signal handler is only
called once.
It's not the only shortage with the current implementation regarding
(real-time) signals. Another one is that they're delivered out-of-order
STINNER Victor victor.stin...@haypocalc.com added the comment:
It's not the only shortage with the current implementation regarding
(real-time) signals. Another one is that they're delivered
out-of-order (lowest-numbered signal first),
Oh yes, it can be a problem.
and the most important
Charles-François Natali neolo...@free.fr added the comment:
Evaluate Python code in a signal handler is really not a good idea!
I know, you're limited to async-safe functions, among other things :-)
because of the GIL, I don't think that we can do better. But with the
GIL of Python 3.3,
New submission from STINNER Victor victor.stin...@haypocalc.com:
If a real time signal is raised 2 times whereas the signal is blocked, unblock
the signal will call the signal handler twice. The C signal handler of the
Python signal module only stores a boolean to say if the Python signal
STINNER Victor victor.stin...@haypocalc.com added the comment:
example.py: example to demonstrate the problem. The Python signal handler is
only called once, it should be called twice.
--
Added file: http://bugs.python.org/file21977/example.py
___
Changes by Nadeem Vawda nadeem.va...@gmail.com:
--
nosy: +nadeem.vawda
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12060
___
___
16 matches
Mail list logo