both O_NONBLOCK/O_NDELAY are set for F_SETFL.
+2003-10-24 Brian Ford <ford@vss.fsi.com>
+
+ * fhandler.cc (fhandler_base::fcntl): Don't clobber O_APPEND when
+ both O_NONBLOCK/O_NDELAY are set for F_SETFL.
+
2003-10-24 Corinna Vinschen <corinna@vinschen.de>
* path.cc (win32_device_name): Fix comment.
Set only the flag that has been passed in. If both are set, just
record O_NONBLOCK. */
if ((new_flags & OLD_O_NDELAY) && (new_flags & O_NONBLOCK))
- new_flags = O_NONBLOCK;
+ new_flags &= ~OLD_O_NDELAY;
set_flags ((get_flags () & ~allowed_flags) | new_flags);
}
res = 0;