Pty.spawnAsync

Starts the specified command under the pseudo-terminal @pty. 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 vte_pty_new(), g_spawn_async() and vte_terminal_watch_child() for more information.

Parameters

workingDirectory string

the name of a directory the command should start in, or %NULL to use the current working directory

argv string[]

child's argument vector

envv string[]

a list of environment variables to be added to the environment before starting the process, or %NULL

spawnFlags GSpawnFlags

flags from #GSpawnFlags

childSetup GSpawnChildSetupFunc

an extra child setup function to run in the child just before exec(), or %NULL

childSetupData void*

user data for @child_setup, or %NULL

childSetupDataDestroy GDestroyNotify

a #GDestroyNotify for @child_setup_data, or %NULL

timeout int

a timeout value in ms, or -1 to wait indefinitely

cancellable Cancellable

a #GCancellable, or %NULL

Meta

Since

0.48