delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/12/10/06:42:10

From: marcus AT sysc DOT pdx DOT edu (Marcus Daniels)
Subject: Re: b17 bash problem with /dev/null on Windows 95 system
10 Dec 1996 06:42:10 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <rfik9qqzj5u.fsf.cygnus.gnu-win32@sayre.sysc.pdx.edu>
References: <199612091553 DOT KAA02700 AT epix DOT net>
<199612100452 DOT WAA02169 AT tillamook-sharp DOT eaton DOT net>
Original-To: "John W. Eaton" <jwe AT bevo DOT che DOT wisc DOT edu>
Original-Cc: <gnu-win32 AT cygnus DOT com>
In-Reply-To: "John W. Eaton"'s message of Mon, 9 Dec 1996 22:52:15 -0600
X-Mailer: Gnus v5.3/Emacs 19.34
Original-Sender: owner-gnu-win32 AT cygnus DOT com

>>>>> "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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019