| 40 | } |
| 41 | |
| 42 | void master_trigger::run_alone(const char* path /* = NULL */, |
| 43 | int count /* = 1 */, int interval /* = 1 */) |
| 44 | { |
| 45 | // ÿ������ֻ����һ��ʵ�������� |
| 46 | acl_assert(has_called == false); |
| 47 | has_called = true; |
| 48 | daemon_mode_ = false; |
| 49 | #ifdef ACL_WINDOWS |
| 50 | acl_cpp_init(); |
| 51 | #endif |
| 52 | if (interval <= 0) { |
| 53 | interval = 1; |
| 54 | } |
| 55 | |
| 56 | // ��ʼ�����ò��� |
| 57 | conf_.load(path); |
| 58 | |
| 59 | service_pre_jail(this); |
| 60 | service_init(this); |
| 61 | |
| 62 | int i = 0; |
| 63 | while (true) { |
| 64 | sleep(interval); |
| 65 | service_main(this); |
| 66 | if (count > 0 && ++i >= count) { |
| 67 | break; |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | service_exit(this); |
| 72 | } |
| 73 | |
| 74 | const char* master_trigger::get_conf_path() const |
| 75 | { |
nothing calls this directly
no test coverage detected