Using the test case below, normally and under versions of valgrind in debian before 2.1.0, you can exit the program using Ctrl+C, using valginr 2.1.0, it is impossible to quit using Ctrl+C. #include <unistd.h> #include <signal.h> static void nullfunction( int ) {} static void setup_signal( int sig, void(*routine)(int) ) { struct sigaction act; act.sa_flags = 0; act.sa_handler = (void(*)(int))routine; sigemptyset( &act.sa_mask ); sigaction( sig, &act, 0 ); } int main() { char buff[8]; setup_signal( SIGINT, nullfunction ); read( 0, buff, sizeof( buff ) ); return 0; }
Another point to note is that this is the correct behaviour if SA_RESTART is specified when the handler is installed, so when fixing this we need to make sure that the system call is restarted in that case...
Fixed in CVS.