root/scm.h @ c4d01aaa
e592f8f7 | Hamish Coleman | /*
|
|
*
|
|||
*
|
|||
*
|
|||
*/
|
|||
4dcb97c2 | Hamish Coleman | struct SCM_def {
|
|
66a63de2 | Hamish Coleman | char *name;
|
|
char *desc;
|
|||
9c69afef | Hamish Coleman | int mode; /* set to SVC_CONSOLE by the *-scm.c code */
|
|
b4d3bd2c | Hamish Coleman | int argc; char **argv; /* original cmdline args */
|
|
9c69afef | Hamish Coleman | int (*init)(int, char **); /* called before main */
|
|
39736270 | Hamish Coleman | int (*main)(int, char **); /* called to run the service */
|
|
int (*stop)(void *); /* called by scm to tell the service to stop */
|
|||
e592f8f7 | Hamish Coleman | };
|
|
9c69afef | Hamish Coleman | int SCM_Start(struct SCM_def *, int argc, char **argv);
|
|
b4d3bd2c | Hamish Coleman | char *SCM_Install(struct SCM_def *,char *);
|
|
4dcb97c2 | Hamish Coleman | int SCM_Remove(struct SCM_def *);
|
|
e592f8f7 | Hamish Coleman | ||
#define SVC_OK 0
|
|||
#define SVC_FAIL -1
|
|||
#define SVC_CONSOLE 1
|