From fd2803670138d173c28f06ad57fd78a80dc4d977 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 29 Dec 2007 05:18:58 +0000 Subject: [PATCH] Add a note on restrictions of child setup functions svn path=/trunk/; revision=6208 --- docs/reference/ChangeLog | 5 +++++ docs/reference/glib/tmpl/spawn.sgml | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 85f7b9eec..a1c4d9021 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,8 @@ +2007-12-29 Matthias Clasen + + * glib/tmpl/spawn.sgml: Add a warning about allowed functions + between fork() and exec(). + 2007-12-24 Benjamin Otte * glib/tmpl/timers.sgml: Add a warning about g_thread_init diff --git a/docs/reference/glib/tmpl/spawn.sgml b/docs/reference/glib/tmpl/spawn.sgml index f4d6ef0c9..c744cee04 100644 --- a/docs/reference/glib/tmpl/spawn.sgml +++ b/docs/reference/glib/tmpl/spawn.sgml @@ -86,6 +86,12 @@ to perform but before calling exec(). On POSIX actions taken in this function will thus only affect the child, not the parent. + +Note that POSIX allows only async-signal-safe functions (see signal(7)) +to be called in the child between fork() and exec(), which drastically +limits the usefulness of child setup functions. + + On Windows the function is called in the parent. Its usefulness on Windows is thus questionable. In many cases executing the child setup