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

Function main_fiber_sighup

lib_fiber/cpp/src/fiber_server.cpp:586–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584#endif
585
586static void main_fiber_sighup(ACL_FIBER *fiber, void *ctx acl_unused)
587{
588 ACL_VSTRING *buf;
589
590 while (1) {
591 acl_fiber_sleep(1);
592
593 if (acl_fiber_killed(fiber)) {
594 break;
595 }
596
597 if (!__sighup_handler || !acl_var_server_gotsighup) {
598 continue;
599 }
600
601 acl_var_server_gotsighup = 0;
602
603 buf = acl_vstring_alloc(128);
604
605#if !defined(_WIN32) && !defined(_WIN64)
606 if (__sighup_handler(__service_ctx, buf) < 0) {
607 acl_master_notify(acl_var_fiber_pid,
608 __server_generation,
609 ACL_MASTER_STAT_SIGHUP_ERR);
610 } else {
611 acl_master_notify(acl_var_fiber_pid,
612 __server_generation,
613 ACL_MASTER_STAT_SIGHUP_OK);
614 }
615#endif
616
617 acl_vstring_free(buf);
618 }
619}
620
621static void main_fiber_monitor_used(ACL_FIBER *fiber, void *ctx acl_unused)
622{

Callers

nothing calls this directly

Calls 5

acl_vstring_allocFunction · 0.85
acl_master_notifyFunction · 0.85
acl_vstring_freeFunction · 0.85
acl_fiber_sleepFunction · 0.50
acl_fiber_killedFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…