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

Ben (linux-kernel-2311@slimyhorror.com)
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:

alarm(1)
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;
}

Regards,
Ben
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/