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: cygwin1.dll (file version 1003.6.0.0) dup problem with gcc


I've been looking into this problem myself, (see last month's thread
starting with http://www.cygwin.com/ml/cygwin/2001-11/msg01217.html )

and have gotten to this point:  at the point where vfork is duplicating the
fhandler table and dup'ing open fh's it somehow isn't detecting that stdin
isn't connected to anything.  (see dtable::vfork_child_dup () in dtable.cc,
line 553)

Where i'm stuck is figuring out why fh 0 has status of 0x18010 (FH_DISK,
FH_RBINSET, FH_SYMLINK).  Shouldn't fh 0 point to stdin?
The file name is a null string, so there's no help there.

BTW, I've written a short windows program to launch make (which i've
recompiled with support for the -D switch, to give me time to attach gdb --
gdb'ing the test-make program doesn't seem to work)  here it is:

 <<test-make.c>> 
It seems that there have been reports of this for gcc and make (my guess is
that it probably happens for all cygwin programs that launch other programs
as child processes) when launched using the windows CreateProcess API call.

Does anyone know how the cygwin dll handles CreateProcess calls in these
cases?

Warm Regards,
Chris

> -----Original Message-----
> From:	Larry Hall (RFK Partners, Inc) [SMTP:lhall@rfk.com]
> Sent:	Monday, December 17, 2001 12:52 PM
> To:	Suman Kumar Ray; cygwin@cygwin.com
> Subject:	Re: cygwin1.dll (file version 1003.6.0.0) dup problem with
> gcc
> 
> At 01:40 PM 12/17/2001, Suman Kumar Ray wrote:
> 
> >Hi,
> >  In the mailing list, I have found this problem with
> >earlier dll but with no solution or information
> >whether this is a bug of cygwin.
> >If I use cygwin.dll file version 1003.6.0.0, then when
> >a windows GUI based IDE is calling gcc through
> >createprocess and pass a file for compilation  error
> >message appears as 
> >fhandler_base::dup: dup(unknown disk file) failed,
> >handle 0, Win32 error 6. If I use cygwin1.dll file 
> >version 1003.2.0.0 ( I mean I put gcc in separate
> >directory and put 1003.2.0.0 cygwin1.dll there), no
> >problem in calling gcc from IDE. Interestingly, if I
> >open cygwin shell, within that I can compile using any
> >of the above dlls.
> >  Can somebody please tell me, what is the problem, and
> >how to rectify it ?
> >  I have tried following command after reading one
> >e-mail, but no success.
> >  mount -b --change-cygdrive-prefix /cygdrive
> 
> Right.  This isn't a cygdrive issue so I wouldn't expect to see any
> significant change by altering the mount option here.
> 
> Clearly, fhandler::dup() is getting an invalid handle ('net helpmsg 6'
> tells you that).  Given that the handle is 0, I think it's clear that
> this complaint is valid.  Beyond that though, you're going to need to
> dig a little deeper to find the root of the problem.  The issue is 
> internal, which would require debugging to find the cause and correct 
> it.  If you can, debugging Cygwin via gdb would be the best way to go.
> Alternatively, if you can't do that, calling gcc indirectly through 
> strace in your IDE environment would provide some trace information 
> that might help you or others better understand the problem.
> 
> Good luck,
> 
> 
> Larry Hall                              lhall@rfk.com
> RFK Partners, Inc.                      http://www.rfk.com
> 838 Washington Street                   (508) 893-9779 - RFK Office
> Holliston, MA 01746                     (508) 893-9889 - FAX
> 
> 
> --
> 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/
> 

Attachment: test-make.c
Description: Binary data

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