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

Function proctl_client_open

lib_acl/src/proctl/acl_proctl.c:93–113  ·  view source on GitHub ↗

������ƽ��̵ļ����߳�֮����������� */

Source from the content-addressed store, hash-verified

91
92/* ������ƽ��̵ļ����߳�֮����������� */
93static 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/* �ر�����ƽ��̵ļ����߳�֮����������� */
116static void proctl_client_close(ACL_VSTREAM *client)

Callers 5

acl_proctl_start_oneFunction · 0.85
acl_proctl_stop_oneFunction · 0.85
acl_proctl_quitFunction · 0.85
acl_proctl_listFunction · 0.85
acl_proctl_probeFunction · 0.85

Calls 6

proctl_initFunction · 0.85
get_lock_fileFunction · 0.85
get_addr_from_fileFunction · 0.85
acl_msg_fatalFunction · 0.85
acl_last_strerrorFunction · 0.85
acl_vstream_connectFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…