Messages in this thread | | | Subject | Re: blocking file lock functions (lockf,flock,fcntl) do not return after timer signal | From | Trond Myklebust <> | Date | Wed, 12 Oct 2005 12:36:47 -0400 |
| |
on den 12.10.2005 Klokka 17:10 (+0200) skreiv Alex Riesen:
> > Desktop$ ./gnurr gnarg > > locking... > > timeout > > timeout > > timeout > > timeout > > timeout > > Doesn't look so. I'd expect "flock: EWOULDBLOCK" and "sleeping" after > the first timeout.
I would rather expect flock to return with ERESTARTSYS and then for libc to restart the syscall once the signal handler has finished executing. A stint with the "strace" utility will show you that this is precisely what happens.
As Dick and others already pointed out to you, the POSIX function sigaction() allows you to disable the automatic restarting of the syscall.
Cheers, Trond
- 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/
| |