| 70 | } |
| 71 | |
| 72 | bool master_threads::run_alone(const char* addrs, const char* path /* = NULL */, |
| 73 | unsigned int, int) |
| 74 | { |
| 75 | #ifdef ACL_WINDOWS |
| 76 | acl_cpp_init(); |
| 77 | #endif |
| 78 | |
| 79 | // ÿ������ֻ����һ��ʵ�������� |
| 80 | acl_assert(__has_called == false); |
| 81 | __has_called = true; |
| 82 | daemon_mode_ = false; |
| 83 | if (addrs == NULL || *addrs == 0) { |
| 84 | if (path == NULL || *path == 0) { |
| 85 | printf("%s: addrs NULL and path NULL\r\n", __FUNCTION__); |
| 86 | return false; |
| 87 | } |
| 88 | printf("%s: addrs NULL and try to use master_service in %s\r\n", |
| 89 | __FUNCTION__, path); |
| 90 | } |
| 91 | |
| 92 | //acl_assert(addrs && *addrs); |
| 93 | |
| 94 | int argc = 0; |
| 95 | const char *argv[5]; |
| 96 | |
| 97 | const char* proc = acl_process_path(); |
| 98 | argv[argc++] = proc ? proc : "demo"; |
| 99 | argv[argc++] = "-L"; |
| 100 | argv[argc++] = addrs; |
| 101 | if (path && *path) { |
| 102 | argv[argc++] = "-f"; |
| 103 | argv[argc++] = path; |
| 104 | } |
| 105 | |
| 106 | run(argc, (char**) argv); |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | ////////////////////////////////////////////////////////////////////////// |
| 111 |
nothing calls this directly
no test coverage detected