Florent Pillet
I discovered an issue on Mac OS X that seems to relate to signal handling. I have a C binding in which I call the standard tmpfile() function. After calling it, I can't break Python anymore with CTRL-C.
Investigating the Darwin source code for tmpfile() (and FreeBSD, they are the same) , I found that the function is mucking with the signals:
Is this considered a Python issue, or an OS issue?
Um, I don't know. That function certainly looks like it's trying to pt the signal mask back.
I ran a simple test against the interrupt signal, which didn't show any wrong behavior:
static void intcatcher(int sig) { printf("Interrupt catched\n"); exit(1); } int main(int argc, char **argv) { signal(SIGINT, intcatcher); printf("Press CTRL-C to interrupt...\n"); tmpfile(); while (1) ; return 0; }
But with my threaded Python code, SIGINT doesn't work anymore after my binding has called tmpfile().
Oh, threads. Which version of Python are you using? Cheers, mwh --
So what does "abc" / "ab" equal? cheese -- Steve Holden defends obscure semantics on comp.lang.python