Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3A79B936.DD790752@delcomsys.com>
Date: Thu, 01 Feb 2001 14:29:58 -0500
From: Patrick Doyle <wpd@delcomsys.com>
X-Mailer: Mozilla 4.76 [en] (Win98; U)
X-Accept-Language: en,zh,zh-CN,zh-TW
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: How to file descriptors get inherited by exec'd processes?
References: <3A798A49.608C6495@delcomsys.com> <20010201111227.B9454@redhat.com> <3A79902B.AD837947@delcomsys.com> <20010201114234.A9784@redhat.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

All right, now we're getting somewhere.  Would you mind giving me some
pointers on how to debug the startup of an exec'd process?

Do I configure with --enable-debugging in order to define the DEBUGGING
preprocessor symbol?

Once I have done that, can I set the CYGWIN_SLEEP environment variable
to some number of milliseconds (such as 30,000) in the environment of
the process to be exec'd?

Once I have done that, do I start gdb with "gdb executable_name WINPID"
where WINPID was conveniently obtained from PS during my 30 second
window?

If I do all of that, will I have some chance of capturing the exec'd
process near the beginning of '_dll_crt0()'?

If I don't get a reply, I will try all of this on my own.  But if you
look through this and know of some obvious reason why it won't work,
please let me know.

Thanks again.  I always appreciate your help.

--wpd


Christopher Faylor wrote:
> 
> On Thu, Feb 01, 2001 at 11:34:51AM -0500, Patrick Doyle wrote:
> >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?
> 
> Yes.
> 
> 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

