Starts the specified command under the pseudo-terminal this.
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 also that g_spawn_stdout_to_dev_null, g_spawn_stderr_to_dev_null
, and g_spawn_child_inherits_stdin are not supported in spawn_flags, since stdin, stdout
and stderr of the child process will always be connected to the PTY. Also g_spawn_leave_descriptors_open
is not supported; and g_spawn_do_not_reap_child will always be added to spawn_flags.
If fds is not null, the child process will map the file descriptors from fds
according to map_fds; map_fds.length must be less or equal to fds.length. This function will take
ownership of the file descriptors in fds; you must not use or close them after this call. All file descriptors in fds
must have the FD_CLOEXEC flag set on them; it will be unset in the child process before calling man:execve(2). Note also that no
file descriptor may be mapped to stdin, stdout, or stderr (file descriptors 0, 1, or 2), since these will be assigned to the PTY. All open
file descriptors apart from those mapped as above will be closed when execve is called.
Beginning with 0.60, and on linux only, and unless vte_spawn_no_systemd_scope is passed in
spawn_flags, the newly created child process will be moved to its own systemd user scope; and if
vte_spawn_require_systemd_scope is passed, and creation of the systemd user scope fails, the whole spawn will fail. You can
override the options used for the systemd user scope by providing a systemd override file for 'vte-spawn-.scope' unit. See
man:systemd.unit(5) for further information.
See Pty, and watch_child for more information.
| this |
a Pty |
| working_directory |
the name of a directory the command should start in, or null to use the current working directory |
| argv |
child's argument vector |
| envv |
a list of environment variables to be added to the environment before starting the process, or null |
| fds |
an array of file descriptors, or null |
| map_fds |
an array of integers, or null |
| spawn_flags |
flags from SpawnFlags |
| child_setup |
an extra child setup function to run in the child just before |
| timeout |
a timeout value in ms, -1 for the default timeout, or G_MAXINT to wait indefinitely |
| cancellable |
a Cancellable, or null |
| callback |
a TaskReadyCallback, or null |
| child_setup_data |
user data for |
| child_setup_data_destroy |
a DestroyNotify for |
| n_fds |
the number of file descriptors in |
| n_map_fds |
the number of elements in |
| user_data |
user data for |