Top | ![]() |
![]() |
![]() |
![]() |
int | gnome_execute_async () |
int | gnome_execute_async_fds () |
int | gnome_execute_async_with_env () |
int | gnome_execute_async_with_env_fds () |
int | gnome_execute_shell () |
int | gnome_execute_shell_fds () |
void | gnome_prepend_terminal_to_vector () |
int | gnome_execute_terminal_shell () |
int | gnome_execute_terminal_shell_fds () |
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.
dir |
Directory in which child should be executesd, or |
|
argc |
Number of arguments |
|
argv |
Argument vector to exec child |
int gnome_execute_async_fds (const char *dir
,int argc
,char * const argv[]
,gboolean close_fds
);
Like gnome_execute_async_with_env_fds()
, but doesn't add
anything to child's environment.
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[]
,gboolean close_fds
);
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.
dir |
Directory in which child should be executed, or |
|
commandline |
Shell command to execute |
int gnome_execute_shell_fds (const char *dir
,const char *commandline
,gboolean close_fds
);
Like gnome_execute_async_with_env_fds()
, 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.
dir |
Directory in which child should be executed, or |
|
commandline |
Shell command to execute |
|
close_fds |
Like close_fds in |
void gnome_prepend_terminal_to_vector (int *argc
,char ***argv
);
Prepends a terminal (either the one configured as default in
the user's GNOME setup, or one of the common xterm emulators) to the passed
in vector, modifying it in the process. The vector should be allocated with
g_malloc, as this will g_free the original vector. Also all elements must
have been allocated separately. That is the standard glib/GNOME way of
doing vectors however. If the integer that argc
points to is negative, the
size will first be computed. Also note that passing in pointers to a vector
that is empty, will just create a new vector for you.
int gnome_execute_terminal_shell (const char *dir
,const char *commandline
);
Like gnome_execute_async, except that it runs the
terminal as well. Note that the pid of the terminal is
returned, not the pid of the user's program.
If commandline is NULL
, just the shell is run.
int gnome_execute_terminal_shell_fds (const char *dir
,const char *commandline
,gboolean close_fds
);
Like gnome_execute_shell_fds()
, except that it runs the
terminal as well. Note that the pid of the terminal is
returned, not the pid of the user's program.
If commandline is NULL
, just the shell is run.
dir |
Directory in which child should be executed, or |
|
commandline |
Shell command to execute |
|
close_fds |
Like close_fds in |