[rtems-docs] pthread_atfork(): Change to behavior from FACE Technical Standard

Joel Sherrill joel at rtems.org
Fri Sep 2 17:45:21 UTC 2022


Updates #4713.
---
 posix-users/process_creation_and_execution.rst | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/posix-users/process_creation_and_execution.rst b/posix-users/process_creation_and_execution.rst
index 835f3cc..8570b25 100644
--- a/posix-users/process_creation_and_execution.rst
+++ b/posix-users/process_creation_and_execution.rst
@@ -313,7 +313,7 @@ pthread_atfork - Register Fork Handlers
 .. list-table::
  :class: rtems-table
 
- * - ``ENOSYS``
+ * - ``0``
    - This routine is not supported by RTEMS.
 
 **DESCRIPTION:**
@@ -322,7 +322,13 @@ This routine is not supported by RTEMS.
 
 **NOTES:**
 
-NONE
+The POSIX specification for ``pthread_atfork()`` does not address the behavior
+when in a single process environment. Originally, the RTEMS implementation
+returned -1 and set errno to ``ENOSYS``. This was an arbitrary decision
+part with no basis from the wider POSIX community. The FACE Technical
+Standard includes profiles without multiple process support and defined
+the behavior in a single process environment to return 0. Logically, the
+application can register atfork handlers but they will never be invoked.
 
 .. _wait:
 
-- 
1.8.3.1



More information about the devel mailing list