Subject: Re: b17 bash problem with /dev/null on Windows 95 system
From: [email-masked] (Marcus Daniels)

10 Dec 1996 06:42:10 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
	<[email-masked]>
Original-To: "John W. Eaton" <[email-masked]>
Original-Cc: <[email-masked]>
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: [email-masked]

>>>>> "JWE" == John W Eaton <[email-masked]> 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
"[email-masked]" with one line of text: "help".