| 562 | #endif |
| 563 | |
| 564 | int 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 |
searching dependent graphs…