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
GType _getGType() static nothrow
GType _gType() @property nothrow
SubprocessLauncher self() nothrowReturns `this`, for use in `with` statements.
SubprocessLauncherGidBuilder builder() static nothrowGet builder for [gio.subprocess_launcher.SubprocessLauncher] Returns: New builder object
void close() nothrowCloses all the file descriptors previously passed to the object with [gio.subprocess_launcher.SubprocessLauncher.takeFd], [gio.subprocess_launcher.SubprocessLauncher.takeStderrFd], etc.
string getenv(string variable) nothrowReturns the value of the environment variable variable in the environment of processes launched from this launcher.
void setCwd(string cwd) nothrowSets the current working directory that processes will be launched with.
void setEnviron(string[] env) nothrowReplace the entire environment of processes launched from this launcher with the given 'environ' variable.
void setFlags(gio.types.SubprocessFlags flags) nothrowSets the flags on the launcher.
void setStderrFilePath(string path = null) nothrowSets the file path to use as the stderr for spawned processes.
void setStdinFilePath(string path = null) nothrowSets the file path to use as the stdin for spawned processes.
void setStdoutFilePath(string path = null) nothrowSets the file path to use as the stdout for spawned processes.
void setenv(string variable, string value, bool overwrite) nothrowSets 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) nothrowTransfer 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) nothrowSets the file descriptor to use as the stderr for spawned processes.
void takeStdinFd(int fd) nothrowSets the file descriptor to use as the stdin for spawned processes.
void takeStdoutFd(int fd) nothrowSets the file descriptor to use as the stdout for spawned processes.
void unsetenv(string variable) nothrowRemoves the environment variable variable from the environment of processes launched from this launcher.
Constructors
this(void * ptr, Flag!"Take" take)
this(gio.types.SubprocessFlags flags)Creates a new #GSubprocessLauncher.

Fluent builder implementation template for gio.subprocess_launcher.SubprocessLauncher

Methods
T flags(gio.types.SubprocessFlags propval) nothrowSet `flags` property. Params: propval = [gio.types.SubprocessFlags] for launched processes. Returns: Builder instance for fluent chaining