Spawn.async

See Spawn.asyncWithPipes for a full description; this function simply calls the Spawn.asyncWithPipes without any pipes.

You should call Spawn.closePid on the returned child process reference when you don't need it any more.

If you are writing a GTK+ application, and the program you are spawning is a graphical application too, then to ensure that the spawned program opens its windows on the right screen, you may want to use gdk.AppLaunchContext, gio.AppLaunchContext, or set the DISPLAY environment variable.

Note that the returned child_pid on Windows is a handle to the child process and not its identifier. Process handles and process identifiers are different concepts on Windows.

class Spawn
static
bool
async

Parameters

workingDirectory string

child's current working directory, or NULL to inherit parent's

argv string[]

child's argument vector

envp string[]

child's environment, or NULL to inherit parent's

flags GSpawnFlags

flags from GSpawnFlags

childSetup GSpawnChildSetupFunc

function to run in the child just before exec()

userData void*

user data for child_setup

childPid GPid

return location for child process reference, or NULL

Return Value

Type: bool

TRUE on success, FALSE if error is set

Throws

GException on failure.