blocking file lock functions (lockf,flock,fcntl) do not return aftertimer signal

From: "Dieter Müller (BOI GmbH)"
Date: Wed Oct 12 2005 - 03:12:43 EST

bug description:

flock, lockf, fcntl do not return even after the signal SIGALRM has been raised and the signal handler function has been executed
the functions should return with a return value EWOULDBLOCK as described in the man pages


sequence of called functions (start the test in 2 terminal sessions)
1. signal
2. setitimer
3. fopen
4. fileno
5. fcntl with F_WRLCK and F_SETLKW (or flock or lockf)
6. getchar (to keep the lock in the 1st session; now start the 2nd)
in the 2nd session the file lock function (fcntl) will not return

kernel versions:


please reply or CC to mailto:boi@xxxxxx

Dieter Mueller-Wipperfuerth
Spazgasse 4
4040 Linz

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