Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 16 Oct 2003 13:45:02 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: Errors when trying to access /dev/null Message-ID: <20031016114502.GF28997@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <20031016082548 DOT GC28997 AT cygbert DOT vinschen DOT de> <000401c393d3$38ee26e0$1a0aa8c0 AT sandyhome> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <000401c393d3$38ee26e0$1a0aa8c0@sandyhome> User-Agent: Mutt/1.4.1i 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 :-( > Or I may just replace the calls to /dev/null > in my configure script with something like /null and let it go to a file > instead. That's not really a solution. That won't make you happy in the long run. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Developer mailto:cygwin AT cygwin DOT com Red Hat, Inc. -- 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/