MCPcopy Create free account
hub / github.com/Tencent/libco / close

Function close

co_hook_sys_call.cpp:316–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314
315
316int close(int fd)
317{
318 HOOK_SYS_FUNC( close );
319
320 if( !co_is_enable_sys_hook() )
321 {
322 return g_sys_close_func( fd );
323 }
324
325 free_by_fd( fd );
326 int ret = g_sys_close_func(fd);
327
328 return ret;
329}
330ssize_t read( int fd, void *buf, size_t nbyte )
331{
332 HOOK_SYS_FUNC( read );

Callers 6

CreateTcpSocketFunction · 0.85
poll_routineFunction · 0.85
readwrite_routineFunction · 0.85
accept_routineFunction · 0.85
CreateTcpSocketFunction · 0.85
readwrite_routineFunction · 0.85

Calls 2

co_is_enable_sys_hookFunction · 0.85
free_by_fdFunction · 0.85

Tested by

no test coverage detected