MCPcopy Create free account
hub / github.com/apache/brpc / is_blocking

Function is_blocking

src/butil/fd_utility.cpp:34–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32namespace butil {
33
34bool is_blocking(int fd) {
35 const int flags = fcntl(fd, F_GETFL, 0);
36 return flags >= 0 && !(flags & O_NONBLOCK);
37}
38
39int make_non_blocking(int fd) {
40 const int flags = fcntl(fd, F_GETFL, 0);

Callers 5

TESTFunction · 0.85
TESTFunction · 0.85
fd.cppFile · 0.85
bthread_timed_connectFunction · 0.85
pthread_timed_connectFunction · 0.85

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.68
TESTFunction · 0.68