| 1115 | |
| 1116 | #if defined(_unix_) |
| 1117 | static inline int GetFlags(int fd) { |
| 1118 | const int ret = fcntl(fd, F_GETFL); |
| 1119 | |
| 1120 | if (ret == -1) { |
| 1121 | ythrow TSystemError() << "can not get fd flags"; |
| 1122 | } |
| 1123 | |
| 1124 | return ret; |
| 1125 | } |
| 1126 | |
| 1127 | static inline void SetFlags(int fd, int flags) { |
| 1128 | if (fcntl(fd, F_SETFL, flags) == -1) { |
no outgoing calls
no test coverage detected