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

From: Ben (linux-kernel-2311@slimyhorror.com)
Date: Mon Jul 14 2003 - 04:48:32 EST


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/



This archive was generated by hypermail 2b29 : Tue Jul 15 2003 - 22:00:50 EST