process.c File Reference
a simple object-oriented process manager More...
#include <stdlib.h>
#include <stddef.h>
#include <stdbool.h>
#include <unistd.h>
#include <sys/types.h>
#include <signal.h>
#include "debug.h"
#include "process.h"
#include "util.h"
Functions | |
co_obj_t * | co_process_create (const size_t size, co_process_t proto, const char *name, const char *pid_file, const char *exec_path, const char *run_path) |
creates a new commotion process More... | |
int | co_process_destroy (co_obj_t *self) |
removes a process from commotiond More... | |
int | co_process_start (co_obj_t *self, char *argv[]) |
starts a selected process More... | |
int | co_process_stop (co_obj_t *self) |
stops a running process More... | |
int | co_process_restart (co_obj_t *self) |
restarts a process More... | |
Detailed Description
a simple object-oriented process manager
Function Documentation
co_obj_t* co_process_create | ( | size_t | size, |
co_process_t | proto, | ||
const char * | name, | ||
const char * | pid_file, | ||
const char * | exec_path, | ||
const char * | run_path | ||
) |
creates a new commotion process
- Parameters
-
size size of the process co_process_t protocol name name of the process pid_file the lockfile where the process id is stored exec_path the execution path run_path the run path
- Returns
- co_process_t to be registered with the daemon
References co_process_destroy(), co_process_start(), and co_process_stop().
int co_process_destroy(co_obj_t *self)
removes a process from commotiond
Definition: process.c:78
Definition: obj.h:131
Definition: process.h:58
int co_process_start(co_obj_t *self, char *argv[])
starts a selected process
Definition: process.c:91
int co_process_destroy | ( | co_obj_t * | self | ) |
removes a process from commotiond
- Parameters
-
self pointer to the process' struct
Referenced by co_process_create().
int co_process_restart | ( | co_obj_t * | self | ) |
restarts a process
- Parameters
-
self pointer to the process' struct
Definition: obj.h:131
Definition: process.h:58
int co_process_start | ( | co_obj_t * | self, |
char * | argv[] | ||
) |
starts a selected process
- Parameters
-
self pointer to the process' struct argv[] execution path for the process
References exec.
Referenced by co_process_create().
Definition: process.h:58
int co_process_stop | ( | co_obj_t * | self | ) |
stops a running process
- Parameters
-
self pointer to the process' struct
Referenced by co_process_create().
Definition: process.h:58
Generated on Fri Jun 6 2014 13:22:05 for commotiond by 1.8.7