linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
To: Jeff Layton <jlayton@poochiereds.net>
Cc: mtk.manpages@gmail.com, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org,
	"linux-man@vger.kernel.org" <linux-man@vger.kernel.org>
Subject: Re: [PATCH man-pages v1] fcntl.2: update manpage with verbiage about open file description locks
Date: Wed, 30 Apr 2014 16:05:09 +0200	[thread overview]
Message-ID: <53610315.10908@gmail.com> (raw)
In-Reply-To: <20140430081501.3aca5cba@tlielax.poochiereds.net>

Hi Jeff,

I'll follow up on your reply in a moment. But, in the meantime, you missed 
a question of mine:

>>> +.TP
>>> +.BR F_OFD_SETLK " (\fIstruct flock *\fP)"
>>> +Acquire an open file description lock (when
>>> +.I l_type
>>> +is
>>> +.B F_RDLCK
>>> +or
>>> +.BR F_WRLCK )
>>> +or release an open file description lock (when
>>> +.I l_type
>>> +is
>>> +.BR F_UNLCK )
>>> +on the bytes specified by the
>>> +.IR l_whence ", " l_start ", and " l_len
>>> +fields of
>>> +.IR lock .
>>> +If a conflicting lock is held by another process,
>>> +this call returns \-1 and sets
>>> +.I errno
>>> +to
>>> +.B EACCES
>>> +or
>>> +.BR EAGAIN .
>>
>> The "EACCES or EAGAIN" thing comes from POSIX, because different 
>> implementations of tradition record locks returned one of these errors. 
>> So, portable applications using traditional locks must handle either 
>> possibility. However, that argument doesn't apply for these new locks. 
>> Surely, we just want to say "set errno to EAGAIN" for this case?

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

  reply	other threads:[~2014-04-30 14:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 18:51 [PATCH man-pages v1] fcntl.2: update manpage with verbiage about open file description locks Jeff Layton
2014-04-30 10:50 ` Michael Kerrisk (man-pages)
2014-04-30 12:15   ` Jeff Layton
2014-04-30 14:05     ` Michael Kerrisk (man-pages) [this message]
     [not found]     ` <20140430081501.3aca5cba-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2014-04-30 14:41       ` Michael Kerrisk (man-pages)

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=53610315.10908@gmail.com \
    --to=mtk.manpages@gmail.com \
    --cc=jlayton@poochiereds.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-man@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).