How to file descriptors get inherited by exec'd processes?

Patrick Doyle wpd@delcomsys.com
Thu Feb 1 11:29:00 GMT 2001


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



More information about the Cygwin mailing list