This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Bad file descriptor


Hi all,

I couldn't find anything directly in the FAQ about this (although I only
scanned it before replying) so please forgive me if I've missed something.
Also if anyone sees any errors in this reply feel free to beat me around the
head with the flat of a spade ;)

Ignasi,

The answer lies in the "/" and "\".  Cygwin uses *nix file paths rather than
Windows and the "\" character denotes an "escaped character".  Therefore, in
your example below Cygwin, or rather the Bash shell, will expand that path
as /cygdrive/d/mcviaodebug.ini.  What you want instead is
/cygdrive/d/mc/viao/debug.ini

There's more information on the filesystem in the Cygwin FAQ (linked off
www.cygwin.com) and  typing "man bash" (without the quotes) should tell you
everything you ever wanted to know about the bash shell.  Also,
www.google.com Is Your Friend (TM).

HTH,

Carl

> -----Original Message-----
> From: Ignasi Villagrasa [mailto:gri@netcom.es]
> Sent: Monday, November 19, 2001 3:43 PM
> To: Cygwin
> Subject: Bad file descriptor
> 
> 
> Hi,
> 
> Hello everyone,
> 
> I got an errno=9 trying to run a program I migrate from Watcom C++ to 
> Cygwin.
> 
> errno.h documents error number 9 as a Bad file descriptor error.
> 
> I've never met an number 9 error, and don't know what's causing it.
> 
> The function I try to run is  fp = fopen(name, "rt").
> 
> with /cygdrive/d/mc\viao\debug.ini  as the name. The file 
> obviously exists.
> 
> /cygdrive/d comes from a call to getcwd(NULL, 0).
> 
> If I run mount in the development computer, I get
> 
> C:\cygwin\lib on /usr/lib type system (binmode)
> c:\cygwin\bin on /bin type user (textmode)
> c:\cygwin\bin on /usr/bin type system (binmode)
> C:\cygwin on / type system (binmode)
> s:\client on /client type user (textmode)
> s:\comun on /comun type user (textmode)
> c: on /cygdrive/c type user (binmode,noumount)
> d: on /cygdrive/d type user (binmode,noumount)
> e: on /cygdrive/e type user (binmode,noumount)
> r: on /cygdrive/r type user (binmode,noumount)
> s: on /cygdrive/s type user (binmode,noumount)
> t: on /cygdrive/t type user (binmode,noumount)
> 
> 
> 
> Thanks in advance, Ignasi Villagrasa.
> 
> 
> 
> 
> 
> 
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 


=======================================================================
Information in this email and any attachments are confidential, and may
not be copied or used by anyone other than the addressee, nor disclosed
to any third party without our permission.  There is no intention to
create any legally binding contract or other commitment through the use
of this email.

Experian Limited (registration number 653331).  
Registered office: Talbot House, Talbot Street, Nottingham NG1 5HF

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]