Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3A79902B.AD837947@delcomsys.com> Date: Thu, 01 Feb 2001 11:34:51 -0500 From: Patrick Doyle X-Mailer: Mozilla 4.76 [en] (Win98; U) X-Accept-Language: en,zh,zh-CN,zh-TW MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: How to file descriptors get inherited by exec'd processes? References: <3A798A49 DOT 608C6495 AT delcomsys DOT com> <20010201111227 DOT B9454 AT redhat DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit OK, thanks... Is it possible that, when a process is spawned by GDB, the DLL thinks that it has been spawned from a non-cygwin process like a windows command shell? I ask because, as I step through dcrt0.cc, I watch the call to 'stdio_init()', and can't see any calls to 'cygheap_fixup_in_child()'. FWIW, I am running gdb from within NTEmacs, I issue "file test3" to load the executable, "dll cygwin1" to load the DLL, and then set breakpoints at specific lines in the source with, for example "break dcrt0.cc:123". I can set a breakpoint at the call to 'stdio_init()', but I never seem to hit the breakpoint at 'cygheap_fixup_in_child()'. Again, any pointers would be greatly appreciated. --wpd Christopher Faylor wrote: > > On Thu, Feb 01, 2001 at 11:09:45AM -0500, Patrick Doyle wrote: > >Could somebody please point me to the location in the source code where > >file descriptors get inhereted by an exec'd process. I see in > >"dcrt0.cc" where 'stdio_init()' is called, which sets up the fdtab for > >stdin, stdout, and stderr (only), but I can't seem to find where the > >rest of the opened file descriptors are inherited. I realize that this > >is a bit off topic for this particular list, but I know the folks who > >know the answer read this list. > > They are inherited automatically in cygheap_fixup_in_child(). > > stdio_init() is only called when a cygwin process is invoked by a > non-cygwin process like a Windows command shell. > > cgf > > -- > Want to unsubscribe from this list? > Check out: http://cygwin.com/ml/#unsubscribe-simple -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple