fhandler_base::fcntl (F_SETFL)

Brian Ford ford@vss.fsi.com
Thu Oct 23 22:53:00 GMT 2003


I'm working on my stupid pedantic patch tricks.  Can you tell? :)

2003-10-23  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.

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444
-------------- next part --------------
Index: fhandler.cc
===================================================================
RCS file: /cvs/src/src/winsup/cygwin/fhandler.cc,v
retrieving revision 1.159
diff -u -p -r1.159 fhandler.cc
--- fhandler.cc	30 Sep 2003 21:46:08 -0000	1.159
+++ fhandler.cc	23 Oct 2003 22:46:06 -0000
@@ -1068,7 +1068,7 @@ int fhandler_base::fcntl (int cmd, void 
 	   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;


More information about the Cygwin-patches mailing list