Fixed incorrect use of F_SETFL.