+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
+2001-06-08 Havoc Pennington <hp@redhat.com>
+
+ * gspawn.c: support G_SPAWN_FILE_AND_ARGV_ZERO specifying that
+ the vector passed in to g_spawn_* contains a filename to
+ execute in argv[0] then the actual argv begins at argv + 1.
+ Kind of a lame hack, but this isn't something you commonly want
+ to do, and avoids adding more function arguments.
+
2001-06-08 Pablo Saratxaga <pablo@mandrakesoft.com>
* configure.in: Added Azeri (az) to ALL_LINGUAS
Portable way to copy <type>va_list</type> variables.
</para>
+<!-- # Unused Parameters # -->
@ap1: the <type>va_list</type> variable to place a copy of @ap2 in.
@ap2: a <type>va_list</type>.
@G_SPAWN_STDOUT_TO_DEV_NULL:
@G_SPAWN_STDERR_TO_DEV_NULL:
@G_SPAWN_CHILD_INHERITS_STDIN:
+@G_SPAWN_FILE_AND_ARGV_ZERO:
<!-- ##### USER_FUNCTION GSpawnChildSetupFunc ##### -->
<para>
gboolean stdout_to_null,
gboolean stderr_to_null,
gboolean child_inherits_stdin,
+ gboolean file_and_argv_zero,
GSpawnChildSetupFunc child_setup,
gpointer user_data,
gint *child_pid,
(flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0,
(flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0,
(flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0,
+ (flags & G_SPAWN_FILE_AND_ARGV_ZERO) != 0,
child_setup,
user_data,
&pid,
* will be discarded. %G_SPAWN_CHILD_INHERITS_STDIN means that
* the child will inherit the parent's standard input (by default,
* the child's standard input is attached to /dev/null).
+ * %G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of @argv is
+ * the file to execute, while the remaining elements are the
+ * actual argument vector to pass to the file. Normally
+ * g_spawn_async_with_pipes() uses @argv[0] as the file to execute, and
+ * passes all of @argv to the child.
*
* @child_setup and @user_data are a function and user data to be
* called in the child after GLib has performed all the setup it plans
(flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0,
(flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0,
(flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0,
+ (flags & G_SPAWN_FILE_AND_ARGV_ZERO) != 0,
child_setup,
user_data,
child_pid,
gboolean stdout_to_null,
gboolean stderr_to_null,
gboolean child_inherits_stdin,
+ gboolean file_and_argv_zero,
GSpawnChildSetupFunc child_setup,
gpointer user_data)
{
(* child_setup) (user_data);
}
- g_execute (argv[0], argv, envp, search_path);
+ g_execute (argv[0],
+ file_and_argv_zero ? argv + 1 : argv,
+ envp, search_path);
/* Exec failed */
write_err_and_exit (child_err_report_fd,
gboolean stdout_to_null,
gboolean stderr_to_null,
gboolean child_inherits_stdin,
+ gboolean file_and_argv_zero,
GSpawnChildSetupFunc child_setup,
gpointer user_data,
gint *child_pid,
stdout_to_null,
stderr_to_null,
child_inherits_stdin,
+ file_and_argv_zero,
child_setup,
user_data);
}
stdout_to_null,
stderr_to_null,
child_inherits_stdin,
+ file_and_argv_zero,
child_setup,
user_data);
}
typedef enum
{
G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0,
- G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1,
+ G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1,
/* look for argv[0] in the path i.e. use execvp() */
- G_SPAWN_SEARCH_PATH = 1 << 2,
+ G_SPAWN_SEARCH_PATH = 1 << 2,
/* Dump output to /dev/null */
- G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
- G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
- G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5
+ G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
+ G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
+ G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5,
+ G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
} GSpawnFlags;
GQuark g_spawn_error_quark (void);
gboolean stdout_to_null,
gboolean stderr_to_null,
gboolean child_inherits_stdin,
+ gboolean file_and_argv_zero,
GSpawnChildSetupFunc child_setup,
gpointer user_data,
gint *child_pid,
(flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0,
(flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0,
(flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0,
+ (flags & G_SPAWN_FILE_AND_ARGV_ZERO) != 0,
child_setup,
user_data,
&pid,
* will be discarded. %G_SPAWN_CHILD_INHERITS_STDIN means that
* the child will inherit the parent's standard input (by default,
* the child's standard input is attached to /dev/null).
+ * %G_SPAWN_FILE_AND_ARGV_ZERO means that the first element of @argv is
+ * the file to execute, while the remaining elements are the
+ * actual argument vector to pass to the file. Normally
+ * g_spawn_async_with_pipes() uses @argv[0] as the file to execute, and
+ * passes all of @argv to the child.
*
* @child_setup and @user_data are a function and user data to be
* called in the child after GLib has performed all the setup it plans
(flags & G_SPAWN_STDOUT_TO_DEV_NULL) != 0,
(flags & G_SPAWN_STDERR_TO_DEV_NULL) != 0,
(flags & G_SPAWN_CHILD_INHERITS_STDIN) != 0,
+ (flags & G_SPAWN_FILE_AND_ARGV_ZERO) != 0,
child_setup,
user_data,
child_pid,
gboolean stdout_to_null,
gboolean stderr_to_null,
gboolean child_inherits_stdin,
+ gboolean file_and_argv_zero,
GSpawnChildSetupFunc child_setup,
gpointer user_data)
{
(* child_setup) (user_data);
}
- g_execute (argv[0], argv, envp, search_path);
+ g_execute (argv[0],
+ file_and_argv_zero ? argv + 1 : argv,
+ envp, search_path);
/* Exec failed */
write_err_and_exit (child_err_report_fd,
gboolean stdout_to_null,
gboolean stderr_to_null,
gboolean child_inherits_stdin,
+ gboolean file_and_argv_zero,
GSpawnChildSetupFunc child_setup,
gpointer user_data,
gint *child_pid,
stdout_to_null,
stderr_to_null,
child_inherits_stdin,
+ file_and_argv_zero,
child_setup,
user_data);
}
stdout_to_null,
stderr_to_null,
child_inherits_stdin,
+ file_and_argv_zero,
child_setup,
user_data);
}
typedef enum
{
G_SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0,
- G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1,
+ G_SPAWN_DO_NOT_REAP_CHILD = 1 << 1,
/* look for argv[0] in the path i.e. use execvp() */
- G_SPAWN_SEARCH_PATH = 1 << 2,
+ G_SPAWN_SEARCH_PATH = 1 << 2,
/* Dump output to /dev/null */
- G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
- G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
- G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5
+ G_SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
+ G_SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
+ G_SPAWN_CHILD_INHERITS_STDIN = 1 << 5,
+ G_SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
} GSpawnFlags;
GQuark g_spawn_error_quark (void);