Sets the status flags of an open file descriptor fd to flags. This is similar to fcntl(fd, F_SETFL, flags) in POSIX.
fcntl(fd, F_SETFL, flags)