From: Alexander Holler <holler-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
To: "Stéphane Aulery" <saulery-GANU6spQydw@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: aio_return(3): misleading RETURN VALUE
Date: Wed, 18 Mar 2015 20:21:28 +0100 [thread overview]
Message-ID: <5509D038.7020907@ahsoftware.de> (raw)
In-Reply-To: <20150318121446.GA5160-GANU6spQydw@public.gmane.org>
Am 18.03.2015 um 13:14 schrieb Stéphane Aulery:
> Hello Alexander,
>
> Le mercredi 18 mars 2015 à 09:03:38, Alexander Holler a écrit :
>>
>> I suggest to use the same wording as in write(2) in the paragraph RETURN
>> VALUE:
>>
>> "On error, -1 is returned, and errno is set appropriately."
>
> Like that ?
>
> If the asynchronous I/O operation has completed, this function
> returns the value that would have been returned in case of a
> synchronous read(2), write(2), fsync(2) or fdatasync(2), call. On
> error, -1 is returned, and errno is set appropriately.
>
> If the asynchronous I/O operation has not yet completed, the return
> value and effect of aio_return() are undefined.
Exactly. Thanks a lot if you change that.
> I think that's what you meant. What will happen if the asynchronous I/O
> operation has not yet completed please ?
It is still undefined, but I haven't looked that up in the source of glibc.
The reason is that aio_return() should only be called if the operation
before has completed, which must be checked with calling aio_error()
before calling aio_return().
That's how I've understood all that and how it currently seems to work
in the SW in question I've fixed a problem.
Regards,
Alexander Holler
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-03-18 19:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-18 8:03 aio_return(3): misleading RETURN VALUE Alexander Holler
[not found] ` <5509315A.1040103-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
2015-03-18 12:14 ` Stéphane Aulery
[not found] ` <20150318121446.GA5160-GANU6spQydw@public.gmane.org>
2015-03-18 19:21 ` Alexander Holler [this message]
[not found] ` <5509D038.7020907-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
2015-03-18 19:57 ` Stéphane Aulery
2015-03-18 19:51 ` [PATCH] aio_return.3: Specifies the return values for errors Stéphane Aulery
[not found] ` <1426708273-9475-1-git-send-email-saulery-GANU6spQydw@public.gmane.org>
2015-03-22 15:19 ` 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=5509D038.7020907@ahsoftware.de \
--to=holler-sxc+2es9fhnfweyvqqpykw@public.gmane.org \
--cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=saulery-GANU6spQydw@public.gmane.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).