Instead of passing a child_setup function whose body is ifdeffed out on

2005-08-26  Tor Lillqvist  <tml@novell.com>

	* app/plug-in/plug-in.c (plug_in_prep_for_exec, plug_in_open):
	Instead of passing a child_setup function whose body is ifdeffed
	out on Win32 to g_spawn_async(), pass NULL for child_setup on
	Win32. Newer g_spawn_async() implementations on Win32 warn if
	child_setup functions are attempted to be used, as they don't make
	sense because without any fork(), they are called in the parent
	process.
This commit is contained in:
Tor Lillqvist 2005-08-26 12:03:24 +00:00 committed by Tor Lillqvist
parent fdb6d8ab45
commit b19dc9af8b
3 changed files with 30 additions and 6 deletions

View File

@ -1,3 +1,13 @@
2005-08-26 Tor Lillqvist <tml@novell.com>
* app/plug-in/plug-in.c (plug_in_prep_for_exec, plug_in_open):
Instead of passing a child_setup function whose body is ifdeffed
out on Win32 to g_spawn_async(), pass NULL for child_setup on
Win32. Newer g_spawn_async() implementations on Win32 warn if
child_setup functions are attempted to be used, as they don't make
sense because without any fork(), they are called in the parent
process.
2005-08-26 Sven Neumann <sven@gimp.org>
* plug-ins/script-fu/scripts/blend-anim.scm: removed newline from

View File

@ -102,8 +102,9 @@ static gboolean plug_in_recv_message (GIOChannel *channel,
GIOCondition cond,
gpointer data);
#if !defined(G_OS_WIN32) && !defined (G_WITH_CYGWIN)
static void plug_in_prep_for_exec (gpointer data);
#endif
void
plug_in_init (Gimp *gimp)
@ -318,10 +319,11 @@ plug_in_unref (PlugIn *plug_in)
}
}
#if !defined(G_OS_WIN32) && !defined (G_WITH_CYGWIN)
static void
plug_in_prep_for_exec (gpointer data)
{
#if !defined(G_OS_WIN32) && !defined (G_WITH_CYGWIN)
PlugIn *plug_in = data;
g_io_channel_unref (plug_in->my_read);
@ -329,9 +331,14 @@ plug_in_prep_for_exec (gpointer data)
g_io_channel_unref (plug_in->my_write);
plug_in->my_write = NULL;
#endif
}
#else
#define plug_in_prep_for_exec NULL
#endif
gboolean
plug_in_open (PlugIn *plug_in)
{

View File

@ -102,8 +102,9 @@ static gboolean plug_in_recv_message (GIOChannel *channel,
GIOCondition cond,
gpointer data);
#if !defined(G_OS_WIN32) && !defined (G_WITH_CYGWIN)
static void plug_in_prep_for_exec (gpointer data);
#endif
void
plug_in_init (Gimp *gimp)
@ -318,10 +319,11 @@ plug_in_unref (PlugIn *plug_in)
}
}
#if !defined(G_OS_WIN32) && !defined (G_WITH_CYGWIN)
static void
plug_in_prep_for_exec (gpointer data)
{
#if !defined(G_OS_WIN32) && !defined (G_WITH_CYGWIN)
PlugIn *plug_in = data;
g_io_channel_unref (plug_in->my_read);
@ -329,9 +331,14 @@ plug_in_prep_for_exec (gpointer data)
g_io_channel_unref (plug_in->my_write);
plug_in->my_write = NULL;
#endif
}
#else
#define plug_in_prep_for_exec NULL
#endif
gboolean
plug_in_open (PlugIn *plug_in)
{