> Von: "linux-os \(Dick Johnson\)" <[email protected]>
> An: "Alex Riesen" <[email protected]>
> Kopie: "Trond Myklebust" <[email protected]>, <[email protected]>,
> "Linux kernel" <[email protected]>
> Betreff: Re: blocking file lock functions (lockf,flock,fcntl) do not
> return after timer signal
[...]
> Datum: Wed, 12 Oct 2005 11:20:26 -0400
> As I told you, you use sigaction(). Also flock() will not block
> unless there is another open on the file. The code will run to
> your blocking read(), wait 10 seconds, get your "timeout" from
> the signal handler, then read() will return with -1 and ERESTARTSYS
> in errno as required.
I was just trying to write a message to say the same ;-).
> Also, using a 'C' runtime library call like write() in a signal-
> handler is a bug.
But this is not correct. write() is async-signal-safe (POSIX
requires it).
Cheers,
Michael
--
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++
-
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]