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 85f7b9e..a1c4d90 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 f4d6ef0..c744cee 100644 --- a/docs/reference/glib/tmpl/spawn.sgml +++ b/docs/reference/glib/tmpl/spawn.sgml @@ -87,6 +87,12 @@ 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 function in the parent can have ill effects, and you should be very -- 2.7.4