public bool spawn_sync (PtyFlags pty_flags, string? working_directory, string argv, string? envv, SpawnFlags spawn_flags, SpawnChildSetupFunc? child_setup, out Pid child_pid, Cancellable? cancellable = null) throws Error
Warning: spawn_sync is deprecated since 0.48.
Starts the specified command under a newly-allocated controlling pseudo-terminal.
Use spawn_async instead.
envv lists should be
null-terminated. The "TERM" environment variable is automatically set
to a default value, but can be overridden from
pty_flags controls logging the session to the specified system
Note that DO_NOT_REAP_CHILD will always be added to
Note also that STDOUT_TO_DEV_NULL,
CHILD_INHERITS_STDIN are not supported in
, since stdin, stdout and stderr of the child process will always be connected to the PTY.
Note that all open file descriptors will be closed in the child. If you want to keep some file descriptor open for use in the child process, you need to use a child setup function that unsets the FD_CLOEXEC flag on that file descriptor.
Beginning with 0.52, sets PWD to
working_directory in order to preserve symlink components. The caller should also make sure that
symlinks were preserved while constructing the value of
working_directory, e.g. by using
flags from PtyFlags
the name of a directory the command should start in, or
child's argument vector
a list of environment variables to be added to the environment before starting the process, or
flags from SpawnFlags
an extra child setup function to run in the child just before
a location to store the child PID, or
a Cancellable, or
user data for