Re: [patch] Document fork() behaviour for the Linux native AIO io_context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jeff,

On Tue, Apr 28, 2009 at 12:46 AM, Jeff Moyer <jmoyer@xxxxxxxxxx> wrote:
> Michael Kerrisk <mtk.manpages@xxxxxxxxxxxxxx> writes:
>
>> Hi Jeff,
>>
>> On Wed, Apr 15, 2009 at 5:54 AM, Jeff Moyer <jmoyer@xxxxxxxxxx> wrote:
>>> Hi,
>>>
>>> It was noted on lkml that the fork behaviour is documented for the posix
>>> AIO calls, but not for the Linux native calls.  Here is a patch which
>>> adds a small blurb that folks will hopefully find useful.
>>>
>>> Signed-off-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
>>>
>>> Upon fork, the child process does not inherit the io_context_t data structures
>>> returned by io_setup, and thus cannot submit further asynchronous I/O or
>>> reap event completions for said contexts.
>>
>> Thanks.  I tweaked that very slightly, and have applied for man-pages-3.22.
>
> Your tweak doesn't really make sense, and it isn't grammatically
> correct.  How about:
>
> nor does it inherit any asynchronous I/O contexts from its parent.
>
> You can add in "see io_setup" if you like.

Thanks for catching that.  I must have wrongly grabbed "outstanding"
from the previous phrase in the page.  I've made the change as below.

By the way, this raises a parallel question: what happens to
asynchronous I/O contexts on an execve(2)?

Cheers,

Michael

--- a/man2/fork.2
+++ b/man2/fork.2
@@ -83,7 +83,9 @@ The child does not inherit timers from its parent
 The child does not inherit outstanding asynchronous I/O operations
 from its parent
 .RB ( aio_read (3),
-.BR aio_write (3)).
+.BR aio_write (3)),
+nor does it inherit any asynchronous I/O contexts from its parent
+.RB ( see io_setup (2)).
 .PP
 The process attributes in the preceding list are all specified
 in POSIX.1-2001.
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux