Function

GLibspawn_async_with_pipes

Declaration

gboolean
g_spawn_async_with_pipes (
  const gchar* working_directory,
  gchar** argv,
  gchar** envp,
  GSpawnFlags flags,
  GSpawnChildSetupFunc child_setup,
  gpointer user_data,
  GPid* child_pid,
  gint* standard_input,
  gint* standard_output,
  gint* standard_error,
  GError** error
)

Description

Identical to g_spawn_async_with_pipes_and_fds() but with n_fds set to zero, so no FD assignments are used.

Parameters

working_directory const gchar*
 

Child’s current working directory, or NULL to inherit parent’s, in the GLib file name encoding.

 The argument can be NULL.
 The data is owned by the caller of the function.
 The value is a file system path, using the OS encoding.
argv An array of filename
 

Child’s argument vector, in the GLib file name encoding; it must be non-empty and NULL-terminated.

 The array must be NULL-terminated.
 The data is owned by the caller of the function.
 Each element is a file system path, using the OS encoding.
envp An array of filename
 
child's environment, or `NULL` to inherit parent's, in the GLib file
name encoding.
 The argument can be NULL.
 The array must be NULL-terminated.
 The data is owned by the caller of the function.
 Each element is a file system path, using the OS encoding.
flags GSpawnFlags
 

Flags from GSpawnFlags.

child_setup GSpawnChildSetupFunc
 

Function to run in the child just before exec()

 The argument can be NULL.
user_data gpointer
 

User data for child_setup.

 The argument can be NULL.
 The data is owned by the caller of the function.
child_pid GPid
 

Return location for child process ID, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
 The called function takes ownership of the data, and is responsible for freeing it.
standard_input gint*
 

Return location for file descriptor to write to child’s stdin, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
standard_output gint*
 

Return location for file descriptor to read child’s stdout, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
standard_error gint*
 

Return location for file descriptor to read child’s stderr, or NULL.

 The argument will be set by the function.
 The argument can be NULL.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE on success, FALSE if an error was set.