From: "Michael Kerrisk" <mtk-lkml@gmx.net>
To: "linux-os \(Dick Johnson\)" <linux-os@analogic.com>
Cc: raa.lkml@gmail.com, trond.myklebust@fys.uio.no, boi@boi.at,
linux-kernel@vger.kernel.org
Subject: Re: blocking file lock functions (lockf,flock,fcntl) do not return after timer signal
Date: Wed, 12 Oct 2005 17:37:02 +0200 (MEST) [thread overview]
Message-ID: <16960.1129131422@www39.gmx.net> (raw)
In-Reply-To: <Pine.LNX.4.61.0510121112060.4302@chaos.analogic.com>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 1027 bytes --]
> Von: "linux-os \(Dick Johnson\)" <linux-os@analogic.com>
> An: "Alex Riesen" <raa.lkml@gmail.com>
> Kopie: "Trond Myklebust" <trond.myklebust@fys.uio.no>, <boi@boi.at>,
> "Linux kernel" <linux-kernel@vger.kernel.org>
> 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 +++
next prev parent reply other threads:[~2005-10-12 15:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-12 7:54 "Dieter Müller (BOI GmbH)"
2005-10-12 12:48 ` Alex Riesen
2005-10-12 13:09 ` linux-os (Dick Johnson)
2005-10-12 14:39 ` Trond Myklebust
2005-10-12 15:10 ` Alex Riesen
2005-10-12 15:20 ` linux-os (Dick Johnson)
2005-10-12 15:37 ` Michael Kerrisk [this message]
2005-10-12 15:43 ` linux-os (Dick Johnson)
2005-10-12 16:05 ` Michael Kerrisk
2005-10-12 16:06 ` Mark Lord
2005-10-12 21:15 ` Alex Riesen
2005-10-12 16:36 ` Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16960.1129131422@www39.gmx.net \
--to=mtk-lkml@gmx.net \
--cc=boi@boi.at \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-os@analogic.com \
--cc=raa.lkml@gmail.com \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®