STINNER Victor <victor.stin...@haypocalc.com> added the comment: Oh, siginterrupt(SIGALRM, 0) doesn't work in a program linked to pthread. Example: -------- #include <signal.h> #include <stdio.h>
void handler(int signum) { printf("HANDLER!\n"); } int main() { int s = SIGALRM; char buffer[1024]; int n; signal(s, handler); siginterrupt(s, 0); alarm(1); printf("read...\n"); n = read(0, buffer, 1024); printf("read->%i\n", n); return 0; } -------- This program ends after 1 second with "read->-1" if it is linked to pthread (bug!), it hangs if it is not linked to pthread (ok). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12905> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com