Mail Archives: cygwin/1996/12/10/06:42:10
>>>>> "JWE" == John W Eaton <jwe AT bevo DOT che DOT wisc DOT edu> writes:
JWE> I did create a /dev directory, but when it didn't help the
JWE> /dev/null problem, I deleted it.  Even without it, redirecting to
JWE> /dev/nul works.  Redirecting /dev/null still fails.
It looks to me like the problem is that there isn't a `dup' method
for /dev/null.
On my Linux machine, I configured using `configure
--target=i586-cygwin32', ran a make, and copied the new-cygwin32.dll
to my Win95 machine.  It's a guess, but it seems to work.
diff -r -c winsup/fhandler.cc /src/gnu-win32/winsup/fhandler.cc
*** winsup/fhandler.cc	Tue Dec  3 19:22:59 1996
--- /src/gnu-win32/winsup/fhandler.cc	Tue Dec 10 02:56:54 1996
***************
*** 999,1004 ****
--- 999,1011 ----
  }
  
  int
+ fhandler_dev_null::dup (fhandler_base *child)
+ {
+   child->set_handle(get_handle());
+   return 0;
+ }
+ 
+ int
  fhandler_base::dup (fhandler_base *child)
  {
    debug_printf ("in fhandler_base dup\n");
diff -r -c winsup/fhandler.h /src/gnu-win32/winsup/fhandler.h
*** winsup/fhandler.h	Tue Dec  3 19:22:59 1996
--- /src/gnu-win32/winsup/fhandler.h	Tue Dec 10 03:01:16 1996
***************
*** 302,307 ****
--- 302,308 ----
    virtual int read (void *ptr, size_t len);
    virtual int write (const void *ptr, size_t len);
    virtual off_t lseek (off_t offset, int whence);
+   virtual int dup (fhandler_base *child);
    virtual void dump ();
  };
  
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -