Use fork1() not fork for G_THREADS_IMPL_SOLARIS. (#136971, Sebastian

Sun Mar 14 13:23:36 2004  Owen Taylor  <otaylor@redhat.com>

        * glib/gspawn.c: Use fork1() not fork for
        G_THREADS_IMPL_SOLARIS. (#136971, Sebastian Wilhelmi)
This commit is contained in:
Owen Taylor 2004-03-14 18:26:47 +00:00 committed by Owen Taylor
parent d261f3fbfc
commit f0f807c51f
7 changed files with 43 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Sun Mar 14 13:23:36 2004 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c: Use fork1() not fork for
G_THREADS_IMPL_SOLARIS. (#136971, Sebastian Wilhelmi)
Sun Mar 14 12:58:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: if _POLL_EMUL_H is defined, undefine

View File

@ -1,3 +1,8 @@
Sun Mar 14 13:23:36 2004 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c: Use fork1() not fork for
G_THREADS_IMPL_SOLARIS. (#136971, Sebastian Wilhelmi)
Sun Mar 14 12:58:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: if _POLL_EMUL_H is defined, undefine

View File

@ -1,3 +1,8 @@
Sun Mar 14 13:23:36 2004 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c: Use fork1() not fork for
G_THREADS_IMPL_SOLARIS. (#136971, Sebastian Wilhelmi)
Sun Mar 14 12:58:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: if _POLL_EMUL_H is defined, undefine

View File

@ -1,3 +1,8 @@
Sun Mar 14 13:23:36 2004 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c: Use fork1() not fork for
G_THREADS_IMPL_SOLARIS. (#136971, Sebastian Wilhelmi)
Sun Mar 14 12:58:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: if _POLL_EMUL_H is defined, undefine

View File

@ -1,3 +1,8 @@
Sun Mar 14 13:23:36 2004 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c: Use fork1() not fork for
G_THREADS_IMPL_SOLARIS. (#136971, Sebastian Wilhelmi)
Sun Mar 14 12:58:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: if _POLL_EMUL_H is defined, undefine

View File

@ -1,3 +1,8 @@
Sun Mar 14 13:23:36 2004 Owen Taylor <otaylor@redhat.com>
* glib/gspawn.c: Use fork1() not fork for
G_THREADS_IMPL_SOLARIS. (#136971, Sebastian Wilhelmi)
Sun Mar 14 12:58:30 2004 Owen Taylor <otaylor@redhat.com>
* glib/gmain.c: if _POLL_EMUL_H is defined, undefine

View File

@ -39,6 +39,17 @@
#include "glibintl.h"
/* With solaris threads, fork() duplicates all threads, which
* a) could cause unexpected side-effects, and b) is expensive.
* Once we remove support for solaris threads, the FORK1 #define
* should be removedl
*/
#ifdef G_THREADS_IMPL_SOLARIS
#define FORK1() fork1()
#else
#define FORK1() fork()
#endif
static gint g_execute (const gchar *file,
gchar **argv,
gchar **envp,
@ -1056,7 +1067,7 @@ fork_exec_with_pipes (gboolean intermediate_child,
if (standard_error && !make_pipe (stderr_pipe, error))
goto cleanup_and_fail;
pid = fork ();
pid = FORK1 ();
if (pid < 0)
{
@ -1098,7 +1109,7 @@ fork_exec_with_pipes (gboolean intermediate_child,
*/
GPid grandchild_pid;
grandchild_pid = fork ();
grandchild_pid = FORK1 ();
if (grandchild_pid < 0)
{