summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler.cc')
-rw-r--r--winsup/cygwin/fhandler.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index af334805a..d719b7ca2 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -1529,6 +1529,15 @@ fhandler_dev_null::fhandler_dev_null () :
{
}
+ssize_t __stdcall
+fhandler_dev_null::write (const void *ptr, size_t len)
+{
+ /* Shortcut. This also fixes a problem with the NUL device on 64 bit:
+ If you write > 4 GB in a single attempt, the bytes written returned
+ from by is numBytes & 0xffffffff. */
+ return len;
+}
+
void
fhandler_base::set_no_inheritance (HANDLE &h, bool not_inheriting)
{