fork.2: EAGAIN is not reported when task allocation fails
PATCH 1/1 fork.2: EAGAIN is not reported when task allocation fails
Hi,
I am not sure why we have:
"
EAGAIN fork() cannot allocate sufficient memory to copy the parent's page tables and allocate a task structure for the child.
"
but it doesn't seem to reflect the reality. The text seems to be there from the time when man-pages were moved to git so there is no history for it. Unless I am missing something we need the patch below.
Thanks!
---
Quoted 1 line
From
9d56f4b46d604fc52aed6d87aac8fa5719ede058Mon Sep 17 00:00:00 2001
From: Michal Hocko <[email protected]>
Date: Tue, 3 Feb 2015 16:34:45 +0100
Subject: [PATCH] fork.2: EAGAIN is not reported when task allocation fails
The man page currently claims:
"
EAGAIN fork() cannot allocate sufficient memory to copy the parent's page tables and allocate a task structure for the child. "
but the kernel reports both dup_task_struct and dup_mm failures as ENOMEM to the userspace. This seems to be the case from early 2.x times so let's simply remove this part.
--- man2/fork.2 | 5 ----- 1 file changed, 5 deletions(-)
man2/fork.2 +0 -5
@@ -185,11 +185,6 @@ is set appropriately. .SH ERRORS .TP .B EAGAIN -.BR fork () -cannot allocate sufficient memory to copy the parent's page tables and -allocate a task structure for the child. -.TP -.B EAGAIN \" NOTE! The following should match the description in pthread_create(3) A system-imposed limit on the number of threads was encountered. There are a number of limits that may trigger this error: the
Signature · 9 lines
2.1.4 -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 11 lines · Michal Hocko
Hi,
I am not sure why we have:
"
EAGAINfork()cannot allocate sufficient memory to copy the parent's page tables and allocate a task structure for the child.
"
but it doesn't seem to reflect the reality. The text seems to be there from the time when man-pages were moved to git so there is no history for it. Unless I am missing something we need the patch below.Thanks!
Thanks, Michal. Applied.
Cheers,
Michael
Quoted 38 lines
---
Quoted 1 line
From
9d56f4b46d604fc52aed6d87aac8fa5719ede058Mon Sep 17 00:00:00 2001From: Michal Hocko <[email protected]>
Date: Tue, 3 Feb 2015 16:34:45 +0100
Subject: [PATCH] fork.2: EAGAIN is not reported when task allocation failsThe man page currently claims:
"
EAGAINfork()cannot allocate sufficient memory to copy the parent's page tables and allocate a task structure for the child. "but the kernel reports both
dup_task_structanddup_mmfailures as ENOMEM to the userspace. This seems to be the case from early 2.x times so let's simply remove this part.Signed-off-by Michal Hocko <[email protected]>--- man2/fork.2 | 5 ----- 1 file changed, 5 deletions(-)man2/fork.2 +0
-5@@ -185,11 +185,6 @@ is set appropriately. .SH ERRORS .TP .B EAGAIN -.BR fork () -cannot allocate sufficient memory to copy the parent's page tables and -allocate a task structure for the child. -.TP -.B EAGAIN \" NOTE! The following should match the description in pthread_create(3) A system-imposed limit on the number of threads was encountered. There are a number of limits that may trigger this error: the
Signature · 7 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/ -- To unsubscribe from this list: send the line "unsubscribe linux-man" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html