commit | a80e4a3546ccee7f8114a88a0a17e09e544d31e2 | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Tue Apr 26 10:18:07 2022 +0200 |
committer | Willy Tarreau <w@1wt.eu> | Tue Apr 26 10:59:48 2022 +0200 |
tree | ee2454d810c0727da366b44e2644e5be535e6508 | |
parent | b4f5fac886e83bf4d0cfef6d2b167f87bbd0b7e8 [diff] |
MINOR: fd: add functions to set O_NONBLOCK and FD_CLOEXEC Instead of seeing each location manipulate the fcntl() themselves and often forget to check previous flags, let's centralize the functions to do this. It also allows to drop fcntl.h from most call places and will ease the adoption of different OS-specific mechanisms if needed. Note that the fd_set_nonblock() function purposely doesn't check the previous flags as it's meant to be used on new FDs only.