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

Function socketpair

lib_fiber/c/src/hook/socket.c:564–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

562#endif
563
564int socketpair(int domain, int type, int protocol, int sv[2])
565{
566 if (sys_socketpair == NULL) {
567 hook_once();
568 if (sys_socketpair == NULL) {
569 return -1;
570 }
571 }
572
573 if ((*sys_socketpair)(domain, type, protocol, sv) == -1) {
574 return -1;
575 }
576
577 if (var_hook_sys_api) {
578 FILE_EVENT *fe = fiber_file_open(sv[0]);
579 file_event_init(fe, sv[0]);
580 fe = fiber_file_open(sv[1]);
581 file_event_init(fe, sv[1]);
582 }
583
584 return 0;
585}
586
587#ifdef CREAT_TIMER_FIBER
588

Callers 5

with_socketpairFunction · 0.50
test_error_eofFunction · 0.50
sane_socketpairFunction · 0.50
fiber_mainFunction · 0.50
acl_sane_socketpairFunction · 0.50

Calls 3

hook_onceFunction · 0.85
fiber_file_openFunction · 0.85
file_event_initFunction · 0.85

Tested by 3

with_socketpairFunction · 0.40
test_error_eofFunction · 0.40
fiber_mainFunction · 0.40

Used in the wild real call sites across dependent graphs

searching dependent graphs…