SubprocessLauncher
Object Hierarchy:
GLib.SubprocessLauncher
GLib.SubprocessLauncher
GLib.SubprocessLauncher
GLib.Object
GLib.Object
GLib.Object->GLib.SubprocessLauncher
Description:
[ CCode ( type_id = "g_subprocess_launcher_get_type ()" ) ] [ Version ( since = "2.40" ) ]public class SubprocessLauncher : Object
This class contains a set of options for launching child processes, such as where its standard input and output will be directed, the
argument list, the environment, and more.
While the Subprocess class has high level functions covering popular cases, use of this
class allows access to more advanced options. It can also be used to launch multiple subprocesses with a similar configuration.
Content:
Properties:
Creation methods:
Methods:
public void close ()
public unowned string ? getenv (string variable)
Returns the value of the environment variable variable
in
the environment of processes launched from this launcher.
public void set_child_setup (owned SpawnChildSetupFunc child_setup)
Sets up a child setup function.
public void set_cwd (string cwd)
Sets the current working directory that processes will be launched
with.
public void set_environ (string [] env)
Replace the entire environment of processes launched from this
launcher with the given 'environ' variable.
public void set_flags (SubprocessFlags flags)
Sets the flags on the launcher.
public void set_stderr_file_path (string ? path)
Sets the file path to use as the stderr for spawned processes.
public void set_stdin_file_path (string path)
Sets the file path to use as the stdin for spawned processes.
public void set_stdout_file_path (string ? path)
Sets the file path to use as the stdout for spawned processes.
public void setenv (string variable, string value, bool overwrite)
Sets the environment variable variable
in the environment
of processes launched from this launcher.
public Subprocess spawn (string argv0, ...) throws Error
Creates a Subprocess
given a provided varargs list of arguments.
public Subprocess spawnv (string [] argv) throws Error
Creates a Subprocess
given a provided array of arguments.
public void take_fd (int source_fd, int target_fd)
Transfer an arbitrary file descriptor from parent process to the
child.
public void take_stderr_fd (int fd)
Sets the file descriptor to use as the stderr for spawned processes.
public void take_stdin_fd (int fd)
Sets the file descriptor to use as the stdin for spawned processes.
public void take_stdout_fd (int fd)
Sets the file descriptor to use as the stdout for spawned processes.
public void unsetenv (string variable)
Removes the environment variable variable
from the
environment of processes launched from this launcher.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref