delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/16/09:02:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Thu, 16 Oct 2003 09:02:17 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: Errors when trying to access /dev/null
In-Reply-To: <20031016114502.GF28997@cygbert.vinschen.de>
Message-ID: <Pine.GSO.4.56.0310160901010.20462@slinky.cs.nyu.edu>
References: <20031016082548 DOT GC28997 AT cygbert DOT vinschen DOT de>
<000401c393d3$38ee26e0$1a0aa8c0 AT sandyhome> <20031016114502 DOT GF28997 AT cygbert DOT vinschen DOT de>
Importance: Normal
MIME-Version: 1.0

On Thu, 16 Oct 2003, Corinna Vinschen wrote:

> On Thu, Oct 16, 2003 at 06:49:47AM -0400, Sandy Pyke wrote:
> > Yeah, gotta admit of all things I never thought 'null' would give me a
> > problem. Guess you can say I got a problem with nothing...
>
> Yeah, obviously :-)
>
> > As I've mentioned, I have been able to get this working on another machine.
> > I took a backup of my cygwin directory there and dumped it on my machine
> > here at home where I'm having the problem. Everything seemed to work okay
> > except for null again. I'm starting to think my problem is in the windows
> > configuration of my machine.
>
> It really seems so.  Please notice that the POSIX device /dev/null is
> translated into the Windows device nul.  And Cygwin is doing that quite
> nicely, just...  but see yourself.  This is an extract from you below strace:
>
>   63  159863 [main] bash 284 fhandler_base::open: (nul, 0x601) query_open 0
>   154  160017 [main] bash 284 seterrno_from_win_error:/netrel/src/cygwin-1.5.5-1/winsup/cygwin/fhandler.cc:478 windows error 2
>   69  160086 [main] bash 284 geterrno_from_win_error: windows error 2 == errno 2
>   63  160149 [main] bash 284 fhandler_base::open: 0 = fhandler_base::open (nul, 0x601)
>
> That's really weird.  Trying to open the Windows "nul" device returns
> actually an error 2 on your machine:
>
>   $ net helpmsg 2
>
>   The system cannot find the file specified.
>
> On my machine, the same code produces the below strace:
>
>   22   58641 [main] bash 1960 fhandler_base::open: (nul, 0x601) query_open 0
>   73   58714 [main] bash 1960 fhandler_base::open: 0x6EC = CreateFile (nul, 0x40000000, 0x7, 0x22F880, 0x2, 0x80, 0)
>   26   58740 [main] bash 1960 fhandler_base::set_flags: flags 0x601, supplied_bin 0x10000
>   21   58761 [main] bash 1960 fhandler_base::set_flags: filemode set to binary
>   19   58780 [main] bash 1960 fhandler_base::open: 1 = fhandler_base::open (nul, 0x601)
>
> > Guess I could format the old HD and start over with a fresh install, but
> > that seems a little radical...
>
> Yes, that seems radical.  And the next step is to buy a new PC ;-)
>
> However, the above effect is pretty weird.  Is it possible (don't laugh)
> that the nul device is broken on your machine?  Actually there's a driver
> ${windir}/system32/drivers/null.sys which manages that device.  Or an
> even worse scenario:  Do you (well, your machine) have some bad virus?
> So far, I have no other idea :-(

Well, that's easy to check, isn't it?  Try "dir > nul" from a cmd.exe
shell, and see if that gives you an error...
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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