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, or %NULL
a #GDestroyNotify for @child_setup_data, or %NULL
a timeout value in ms, or -1 to wait indefinitely
a #GCancellable, or %NULL
a #VteTerminalSpawnAsyncCallback, or %NULL
user data for @callback, or %NULL
0.48
A convenience function that wraps creating the #VtePty and spawning the child process on it. See vte_pty_new_sync(), vte_pty_spawn_async(), and vte_pty_spawn_finish() for more information.
When the operation is finished successfully, @callback will be called with the child #GPid, and a %NULL #GError. The child PID will already be watched via vte_terminal_watch_child().
When the operation fails, @callback will be called with a -1 #GPid, and a non-%NULL #GError containing the error information.
Note that if @terminal has been destroyed before the operation is called, @callback will be called with a %NULL @terminal; you must not do anything in the callback besides freeing any resources associated with @user_data, but taking care not to access the now-destroyed #VteTerminal. Note that in this case, if spawning was successful, the child process will be aborted automatically.
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 vte_terminal_get_current_directory_uri(), g_get_current_dir() or get_current_dir_name().