������ƽ��̵ļ����߳�֮����������� */
| 91 | |
| 92 | /* ������ƽ��̵ļ����߳�֮����������� */ |
| 93 | static ACL_VSTREAM *proctl_client_open(const char *progname) |
| 94 | { |
| 95 | const char *myname = "proctl_client_open"; |
| 96 | char ebuf[256], lock_file[MAX_PATH], addr[256]; |
| 97 | ACL_VSTREAM *client; |
| 98 | |
| 99 | proctl_init(progname); |
| 100 | |
| 101 | get_lock_file(lock_file, sizeof(lock_file)); |
| 102 | |
| 103 | if (get_addr_from_file(lock_file, addr, sizeof(addr)) < 0) |
| 104 | acl_msg_fatal("%s(%d): get addr from file(%s) error(%s)", |
| 105 | myname, __LINE__, lock_file, acl_last_strerror(ebuf, sizeof(ebuf))); |
| 106 | |
| 107 | client = acl_vstream_connect(addr, ACL_BLOCKING, 10, 10, 1024); |
| 108 | if (client == NULL) |
| 109 | acl_msg_fatal("%s(%d): connect addr(%s) error(%s)", |
| 110 | myname, __LINE__, addr, acl_last_strerror(ebuf, sizeof(ebuf))); |
| 111 | |
| 112 | return (client); |
| 113 | } |
| 114 | |
| 115 | /* �ر�����ƽ��̵ļ����߳�֮����������� */ |
| 116 | static void proctl_client_close(ACL_VSTREAM *client) |
no test coverage detected
searching dependent graphs…