#include <gnome.h> int gnome_execute_async (const char *dir, int argc, char *const argv[]); int gnome_execute_async_fds (const char *dir, int argc, char *const argv[], |
The family of gnome-execute functions are provided to simplify execution of programs from withing GNOME applications. These routines are required to avoid passing opened file descriptors to a child process (like the X11 sockets and CORBA sockets). They will also make sure to terminate properly.
The range of possibilities goes from the most simple use to the most specialized ones.
int gnome_execute_async (const char *dir, int argc, char *const argv[]); |
Like gnome_execute_async_with_env(), but doesn't add anything to child's environment.
int gnome_execute_async_fds (const char *dir, int argc, char *const argv[], |
int gnome_execute_async_with_env (const char *dir, int argc, char *const argv[], int envc, char *const envv[]); |
This function forks and executes some program in the background. On error, returns -1; in this case, errno should hold a useful value. Searches the path to find the child. Environment settings in envv are added to the existing environment -- they do not completely replace it. This function closes all fds besides 0, 1, and 2 for the child
int gnome_execute_async_with_env_fds (const char *dir, int argc, char *const argv[], int envc, char *const envv[], |
Like gnome_execute_async_with_env() but has a flag to decide whether or not * to close fd's
int gnome_execute_shell (const char *dir, const char *commandline); |
Like gnome_execute_async_with_env(), but uses the user's shell to run the desired program. Note that the pid of the shell is returned, not the pid of the user's program.
int gnome_execute_shell_fds (const char *dir, const char *commandline, |