This code indicates success, rather than an error.
This may not be the correct interpretation of this code,
or possibly the program is handling errors incorrectly.
I was under the impression that fcntl(fd, F_SETFD, flg ) and flg = fcntl(fd, F_GETFD, flg ) could be used for setting and getting filedescriptor flags. According to https://community.spiceworks.com/linux/man/2/fcntl, linux should only support the setting of some fd flags. Fair enough. But judging by the output of: #define _GNU_SOURCE #include [...] read more