Terminal.forkCommand

Warning vte_terminal_fork_command has been deprecated since version 0.26 and should not be used in newly-written code. Use vte_terminal_fork_command_full() Starts the specified command under a newly-allocated controlling pseudo-terminal. The argv and envv lists should be NULL-terminated, and argv[0] is expected to be the name of the file being run, as it would be if execve() were being called. TERM is automatically set to reflect the terminal widget's emulation setting. If lastlog, utmp, or wtmp are TRUE, logs the session to the specified system log files. Note that all file descriptors except stdin/stdout/stderr will be closed before calling exec() in the child.

class Terminal
forkCommand
(
string command
,
string[] argv
,
string[] envv
,,,
int utmp
,
int wtmp
)

Parameters

command string

the name of a binary to run, or NULL to spawn the user's shell. [allow-none][type filename]

argv string[]

the argument list to be passed to command, or NULL. [allow-none][array zero-terminated=1][element-type filename]

envv string[]

a list of environment variables to be added to the environment before starting command, or NULL. [allow-none][array zero-terminated=1][element-type filename]

workingDirectory string

the name of a directory the command should start in, or NULL. [allow-none][type filename]

lastlog int

TRUE if the session should be logged to the lastlog

utmp int

TRUE if the session should be logged to the utmp/utmpx log

wtmp int

TRUE if the session should be logged to the wtmp/wtmpx log

Return Value

Type: pid_t

the PID of the new process, or -1 on failure

Meta