gio.subprocess_launcher
Module for [SubprocessLauncher] class
Types 3
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 [gio.subprocess.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.
Methods
SubprocessLauncher self()Returns `this`, for use in `with` statements.SubprocessLauncherGidBuilder builder()Get builder for [gio.subprocess_launcher.SubprocessLauncher] Returns: New builder objectvoid close()Closes all the file descriptors previously passed to the object with [gio.subprocesslauncher.SubprocessLauncher.takeFd], [gio.subprocesslauncher.SubprocessLauncher.takeStderrFd], etc.string getenv(string variable)Returns the value of the environment variable variable in the environment of processes launched from this launcher.void setCwd(string cwd)Sets the current working directory that processes will be launched with.void setEnviron(string[] env)Replace the entire environment of processes launched from this launcher with the given 'environ' variable.void setFlags(gio.types.SubprocessFlags flags)Sets the flags on the launcher.void setStderrFilePath(string path = null)Sets the file path to use as the stderr for spawned processes.void setStdinFilePath(string path = null)Sets the file path to use as the stdin for spawned processes.void setStdoutFilePath(string path = null)Sets the file path to use as the stdout for spawned processes.void setenv(string variable, string value, bool overwrite)Sets the environment variable variable in the environment of processes launched from this launcher.gio.subprocess.Subprocess spawnv(string[] argv)Creates a #GSubprocess given a provided array of arguments.void takeFd(int sourceFd, int targetFd)Transfer an arbitrary file descriptor from parent process to the child. This function takes ownership of the source_fd; it will be closed in the parent when self is freed.void takeStderrFd(int fd)Sets the file descriptor to use as the stderr for spawned processes.void takeStdinFd(int fd)Sets the file descriptor to use as the stdin for spawned processes.void takeStdoutFd(int fd)Sets the file descriptor to use as the stdout for spawned processes.void unsetenv(string variable)Removes the environment variable variable from the environment of processes launched from this launcher.Constructors
this(gio.types.SubprocessFlags flags)Creates a new #GSubprocessLauncher.Methods
T flags(gio.types.SubprocessFlags propval)Set `flags` property. Params: propval = [gio.types.SubprocessFlags] for launched processes. Returns: Builder instance for fluent chainingFluent builder for [gio.subprocess_launcher.SubprocessLauncher]
Methods