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

Function proctl_monitor_loop

lib_acl/src/proctl/proctl_monitor.c:291–317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291static void proctl_monitor_loop(ACL_VSTREAM *sstream)
292{
293 const char *myname = "proctl_monitor_loop";
294 ACL_VSTREAM *client;
295 int n;
296 char buf[1024];
297 ACL_ARGV *cmd_argv;
298
299 while (1) {
300 client = acl_vstream_accept(sstream, NULL, 0);
301 if (client == NULL)
302 continue;
303
304 n = acl_vstream_gets_nonl(client, buf, sizeof(buf));
305 if (n == ACL_VSTREAM_EOF)
306 continue;
307
308 acl_debug(ACL_DEBUG_PROCTL, 2) ("%s(%d): get buf(%s)",
309 myname, __LINE__, buf);
310 cmd_argv = acl_argv_split(buf, "|");
311 if (cmd_argv)
312 proctl_monitor_main(client, cmd_argv->argc, cmd_argv->argv);
313 else
314 usage(client);
315 acl_vstream_close(client);
316 }
317}
318
319void *proctl_monitor_thread(void *arg)
320{

Callers 1

proctl_monitor_threadFunction · 0.85

Calls 6

acl_vstream_acceptFunction · 0.85
acl_vstream_gets_nonlFunction · 0.85
acl_argv_splitFunction · 0.85
proctl_monitor_mainFunction · 0.85
acl_vstream_closeFunction · 0.85
usageFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…