From 2b7dcf79ae6335718e4ee92a76fa3d276ac5192b Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 24 Oct 2003 12:11:20 +0000 Subject: * fhandler.cc (fhandler_base::fcntl): Don't clobber O_APPEND when both O_NONBLOCK/O_NDELAY are set for F_SETFL. --- winsup/cygwin/fhandler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler.cc') diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 07bcdc94f..79f3e2621 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -1068,7 +1068,7 @@ int fhandler_base::fcntl (int cmd, void *arg) 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; -- cgit v1.2.3