[issue12224] problem with siginterrupt

2011-06-04 Thread Zhiping Deng
Zhiping Deng added the comment: I think the problem is that after a user calles signal.siginterrupt(False), he would expect that the socket.recv should handles EINTR properly for him because it's the behaviour in c level. He doesn't know socket.recv() calles select(2) internally and he needn'

[issue12224] problem with siginterrupt

2011-06-04 Thread STINNER Victor
STINNER Victor added the comment: > Victor, I understand your response as saying that there is no bug, > which would suggest closing this. Correct? If not, what is > the requested action? siginterrupt(False) has no effect on select(). I listed some solutions to not interrupt select() on a sign

[issue12224] problem with siginterrupt

2011-06-04 Thread Charles-François Natali
Charles-François Natali added the comment: Actually, it's part of a more general problem with EINTR being returned by many posix/socket module functions, see for example issue #7978. On the one hand, having to retry manually on EINTR is cumbersome, on the other hand, some code might rely on th

[issue12224] problem with siginterrupt

2011-06-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: Victor, I understand your response as saying that there is no bug, which would suggest closing this. Correct? If not, what is the requested action? -- nosy: +terry.reedy ___ Python tracker

[issue12224] problem with siginterrupt

2011-05-31 Thread STINNER Victor
STINNER Victor added the comment: Extract of manpage signal(7): "The following interfaces are never restarted after being interrupted by a signal handler, regardless of the use of SA_RESTART; they always fail with the error EINTR when interrupted by a signal handler: * ... * File descrip

[issue12224] problem with siginterrupt

2011-05-31 Thread Zhiping Deng
New submission from Zhiping Deng : If socket timeout > 0, then there is no way to automatically restart some socket calls like recv(). Calling siginterrupt(False) is useless, because python calls internal_select() if socket has timeout, and select returns error(EINTR) once interrupted by a signa