Re: 2.5 kernel regression in alarm() syscall behaviour?

Ben (
Mon, 14 Jul 2003 10:48:32 +0100 (BST)

I think I'm hitting a similar problem to the one Paul describes. We have
code in our test framework that does:

do some test that should complete almost immediately (i.e. not block)
a = alarm(0)
check that a == 1

On Linux 2.0, 2.2, 2.4, and a whole range of Unix-alikes, a = 1. On Linux
2.5.75-mm1, a=2. This does suggest that the behaviour of 2.5 is wrong...

Minimal test program:

#include <unistd.h>
#include <stdio.h>

int main( int argc, char **argv )
int left;
alarm( 1 );
left = alarm( 0 );
printf( "%d\n", left );
return 0;

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at