flags from VtePtyFlags
the name of a directory the command should start in, or NULL to use the current working directory
child's argument vector
a list of environment variables to be added to the environment before starting the process, or NULL
flags from GSpawnFlags
an extra child setup function to run in the child just before exec(), or NULL
user data for child_setup
a location to store the child PID, or NULL
a gio.Cancellable, or NULL
TRUE on success, or FALSE on error with error filled in
Deprecated: Use Terminal.spawnAsync instead.
GException on failure.
Starts the specified command under a newly-allocated controlling pseudo-terminal. The argv and envv lists should be NULL-terminated. The "TERM" environment variable is automatically set to a default value, but can be overridden from envv. pty_flags controls logging the session to the specified system log files.
Note that G_SPAWN_DO_NOT_REAP_CHILD will always be added to spawn_flags.
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.
See Pty.new, Spawn.async and Terminal.watchChild for more information.
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 Terminal.getCurrentDirectoryUri, g_get_current_dir() or get_current_dir_name().