process

Name

process -- 

Synopsis



enum        GnomeVFSProcessResult;
enum        GnomeVFSProcessRunResult;
enum        GnomeVFSProcessOptions;
struct      GnomeVFSProcess;
void        (*GnomeVFSProcessInitFunc)      (gpointer data);
void        (*GnomeVFSProcessCallback)      (GnomeVFSProcess *process,
                                             gint status,
                                             gpointer data);
gboolean    gnome_vfs_process_init          (void);
GnomeVFSProcess* gnome_vfs_process_new      (const gchar *file_name,
                                             const gchar *const      argv[],
                                             GnomeVFSProcessOptions options,
                                             GnomeVFSProcessInitFunc init_func,
                                             gpointer init_data,
                                             GnomeVFSProcessCallback callback,
                                             gpointer callback_data);
void        gnome_vfs_process_free          (GnomeVFSProcess *process);

Description

Details

enum GnomeVFSProcessResult

typedef enum {
	GNOME_VFS_PROCESS_OK,
	GNOME_VFS_PROCESS_ERROR_UNKNOWN,
	GNOME_VFS_PROCESS_ERROR_INVALIDSIGNAL,
	GNOME_VFS_PROCESS_ERROR_NOPERM,
	GNOME_VFS_PROCESS_ERROR_NOPROCESS
} GnomeVFSProcessResult;


enum GnomeVFSProcessRunResult

typedef enum {
	GNOME_VFS_PROCESS_RUN_OK,
	GNOME_VFS_PROCESS_RUN_ERROR,
	GNOME_VFS_PROCESS_RUN_CANCELLED,
	GNOME_VFS_PROCESS_RUN_SIGNALED,
	GNOME_VFS_PROCESS_RUN_STOPPED
} GnomeVFSProcessRunResult;


enum GnomeVFSProcessOptions

typedef enum {
	GNOME_VFS_PROCESS_DEFAULT = 0,
	GNOME_VFS_PROCESS_USEPATH = 1 << 0,
	GNOME_VFS_PROCESS_CLOSEFDS = 1 << 1,
	GNOME_VFS_PROCESS_SETSID = 1 << 2
} GnomeVFSProcessOptions;


struct GnomeVFSProcess

struct GnomeVFSProcess;


GnomeVFSProcessInitFunc ()

void        (*GnomeVFSProcessInitFunc)      (gpointer data);

data : 


GnomeVFSProcessCallback ()

void        (*GnomeVFSProcessCallback)      (GnomeVFSProcess *process,
                                             gint status,
                                             gpointer data);

process : 
status : 
data : 


gnome_vfs_process_init ()

gboolean    gnome_vfs_process_init          (void);

Returns : 


gnome_vfs_process_new ()

GnomeVFSProcess* gnome_vfs_process_new      (const gchar *file_name,
                                             const gchar *const      argv[],
                                             GnomeVFSProcessOptions options,
                                             GnomeVFSProcessInitFunc init_func,
                                             gpointer init_data,
                                             GnomeVFSProcessCallback callback,
                                             gpointer callback_data);

Launch a new process. init_func is called immediately after calling fork(), and before closing the file descriptors and executing the program in the new process.

file_name : Name of the executable.
argv : NULL-terminated parameter list.
options : 
init_func : Function to be called before launching the process.
init_data : Value to pass to init_func.
callback : Function to invoke when the process die.
callback_data : Data to pass to callback when the process dies.
Returns : An opaque structure describing the launched process.


gnome_vfs_process_free ()

void        gnome_vfs_process_free          (GnomeVFSProcess *process);

Free process. This will not kill the process, but will prevent the associated callbacks to be called.

process : An existing process.