linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Stéphane Aulery" <saulery-GANU6spQydw@public.gmane.org>
To: Alexander Holler <holler-SXC+2es9fhnfWeYVQQPykw@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:57:03 +0100	[thread overview]
Message-ID: <20150318195703.GA9606@free.fr> (raw)
In-Reply-To: <5509D038.7020907-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>

Hello Alexander,

Le mercredi 18 mars 2015 à 08:21:28, Alexander Holler a écrit :
> Am 18.03.2015 um 13:14 schrieb Stéphane Aulery:
> >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.

Patch is pending for review by Michael.

> >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.

Thank you for yours clarifications.

Regards,

-- 
Stéphane Aulery
--
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

  parent reply	other threads:[~2015-03-18 19:57 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
     [not found]         ` <5509D038.7020907-SXC+2es9fhnfWeYVQQPykw@public.gmane.org>
2015-03-18 19:57           ` Stéphane Aulery [this message]
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=20150318195703.GA9606@free.fr \
    --to=saulery-ganu6spqydw@public.gmane.org \
    --cc=holler-SXC+2es9fhnfWeYVQQPykw@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@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).