2019-07-28 10:31:56 +08:00
|
|
|
|
#ifndef ACL_PROCTL_INCLUDE_H
|
2014-11-19 00:25:21 +08:00
|
|
|
|
#define ACL_PROCTL_INCLUDE_H
|
|
|
|
|
|
2017-06-02 14:47:24 +08:00
|
|
|
|
#include "../stdlib/acl_define.h"
|
2014-11-19 00:25:21 +08:00
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̵<EFBFBD>ִ<EFBFBD>г<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>·<EFBFBD><EFBFBD>λ<EFBFBD><EFBFBD>
|
|
|
|
|
* @param buf {char*} <EFBFBD>洢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD>λ<EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD>صĽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľ<EFBFBD>β
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "\" <20><> "/",<2C><><EFBFBD>磺"C:\\test_path\\test1_path", <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
* "C:\\test_path\\test1_path\\"
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* @param size {size_t} buf <EFBFBD>Ŀռ<EFBFBD><EFBFBD><EFBFBD>С
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_daemon_path(char *buf, size_t size);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̿<EFBFBD><EFBFBD>ƿ<EFBFBD><EFBFBD>ܣ<EFBFBD><EFBFBD><EFBFBD> acl_proctl_start <EFBFBD><EFBFBD>Ҫ<EFBFBD><EFBFBD>
|
|
|
|
|
* @param progname {const char*} <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_deamon_init(const char *progname);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>̨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>У<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD>̵<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>״̬<EFBFBD><EFBFBD>
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>쳣<EFBFBD>˳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_daemon_loop(void);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>ڿ<EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progchild {const char*} <EFBFBD>ӽ<EFBFBD><EFBFBD>̵ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argc {int} argv <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
* @param argv {char* []}
|
|
|
|
|
* @return 0: ok; -1: error
|
|
|
|
|
*/
|
|
|
|
|
ACL_API int acl_proctl_deamon_start_one(const char *progchild, int argc, char *argv[]);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progname {const char*} <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progchild {const char*} <EFBFBD>ӽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argc {int} argv <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argv {char* []} <EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD>̵IJ<EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_start_one(const char *progname,
|
|
|
|
|
const char *progchild, int argc, char *argv[]);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽֹͣij<EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progname {const char*} <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progchild {const char*} <EFBFBD>ӽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argc {int} argv <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param argv {char* []} <EFBFBD><EFBFBD><EFBFBD>ݸ<EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD>̵IJ<EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_stop_one(const char *progname,
|
|
|
|
|
const char *progchild, int argc, char *argv[]);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽֹͣ<EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progname {const char*} <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_stop_all(const char *progname);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ֪ͨ<EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>ֹͣ<EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD>̣<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD><EFBFBD>Ҳ<EFBFBD>Զ<EFBFBD><EFBFBD>˳<EFBFBD>
|
|
|
|
|
* @param progname {const char*} <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_quit(const char *progname);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>г<EFBFBD><EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>еķ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progname {const char*} <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_list(const char *progname);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* ̽<EFBFBD><EFBFBD>ij<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progname {const char*} <EFBFBD><EFBFBD><EFBFBD>ƽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param progchild {const char*} <EFBFBD>ӽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_probe(const char *progname, const char *progchild);
|
|
|
|
|
|
|
|
|
|
/**
|
2019-07-28 10:31:56 +08:00
|
|
|
|
* <EFBFBD>ӽ<EFBFBD><EFBFBD>̵<EFBFBD><EFBFBD>ýӿڣ<EFBFBD>ͨ<EFBFBD><EFBFBD><EFBFBD>˽ӿ<EFBFBD><EFBFBD>븸<EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD>佨<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƹ<EFBFBD>ϵ
|
|
|
|
|
* @param progname {const char*} <EFBFBD>ӽ<EFBFBD><EFBFBD>̽<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param onexit_fn {void (*)(void*)} <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>ʱ<EFBFBD><EFBFBD><EFBFBD>õĻص<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param arg {void*} onexit_fn <EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮һ
|
2014-11-19 00:25:21 +08:00
|
|
|
|
*/
|
|
|
|
|
ACL_API void acl_proctl_child(const char *progname, void (*onexit_fn)(void *), void *arg);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#endif
|