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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]