ֹͣij��������� */
| 91 | |
| 92 | /* ֹͣij��������� */ |
| 93 | static 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 | /* ֪ͨ���̣߳�����һ������ */ |
| 122 | static int proctl_monitor_cmd_start(ACL_VSTREAM *client, |
no test coverage detected
searching dependent graphs…