spawn_command_line_async


Description:

public bool spawn_command_line_async (string command_line) throws SpawnError

A simple version of spawn_async that parses a command line with parse_argv and passes it to spawn_async.

Runs a command line in the background. Unlike spawn_async, the g_spawn_search_path flag is enabled, other flags are not. Note that g_spawn_search_path can have security implications, so consider using spawn_async directly if appropriate. Possible errors are those from parse_argv and spawn_async.

The same concerns on Windows apply as for spawn_command_line_sync .

Example: Spawn a command line, async:

public static int main (string[] args) {
try {
Process.spawn_command_line_async ("mkdir MY-NEW-DIR");
} catch (SpawnError e) {
print ("Error: %s\n", e.message);
}
return 0;
}

valac --pkg glib-2.0 GLib.Process.spawn_command_line_async.vala

Parameters:

command_line

a command line

Returns:

true on success, false if error is set


Namespace: GLib.Process
Package: glib-2.0