MCPcopy Create free account
hub / github.com/acl-dev/acl / proctl_monitor_cmd_stop

Function proctl_monitor_cmd_stop

lib_acl/src/proctl/proctl_monitor.c:93–119  ·  view source on GitHub ↗

ֹͣij��������� */

Source from the content-addressed store, hash-verified

91
92/* ֹͣij��������� */
93static int proctl_monitor_cmd_stop(ACL_VSTREAM *client,
94 const char *filepath, const char *args)
95{
96 const char *myname = "proctl_monitor_cmd_stop";
97
98 if (filepath == NULL || *filepath == 0) {
99 acl_vstream_fprintf(client, "-ERR|filepath null\r\n");
100 acl_msg_error("%s(%d): no filepath", myname, __LINE__);
101 return (-1);
102 }
103
104 if (strcasecmp(filepath, "all") == 0) {
105 acl_msg_info("begin to stop file(%s)", filepath);
106 proctl_monitor_stop_all_service(client);
107 } else if (!proctl_service_exist(filepath)) {
108 acl_msg_error("%s(%d): filepath(%s) not running now",
109 myname, __LINE__, filepath);
110 acl_vstream_fprintf(client, "-ERR|filepath(%s) not running\r\n",
111 filepath);
112 return (-1);
113 }
114
115 acl_msg_info("%s(%d): begin to stop file(%s)", myname, __LINE__, filepath);
116 proctl_monitor_stop_service(client, filepath, args);
117 acl_msg_info("%s(%d): stop (%s) end", myname, __LINE__, filepath);
118 return (0);
119}
120
121/* ֪ͨ���̣߳�����һ������ */
122static int proctl_monitor_cmd_start(ACL_VSTREAM *client,

Callers 1

proctl_monitor_mainFunction · 0.85

Calls 6

acl_vstream_fprintfFunction · 0.85
acl_msg_errorFunction · 0.85
acl_msg_infoFunction · 0.85
proctl_service_existFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…