Mail Archives: cygwin-developers/1999/12/04/21:46:10
On Sat, Dec 04, 1999 at 08:36:44PM -0600, Mumit Khan wrote:
>Chris Faylor <cgf AT cygnus DOT com> writes:
>>
>> That's right. There is no way to inherit fds in a non-cygwin app since
>> the fds are passed via a "reserved" block in CreateProcess. I've been
>> contemplating changing that.
>>
>> From what I see in your patch, I think you've done the only thing that
>> makes sense.
>
>That was the last resort. I had been sitting on this patch long enough
>that I decided to punt the issue and submit. Should've asked earlier!
>
>The problem is the following: if I run say a Java JNI from a shell that
>is non-cygwin (eg., DOS shell), stdout/err work just fine; if I run it
>from Cygwin shell, nothing shows up since somewhere in there, the std
>fd's are closed. It's not that big of a problem in my book, but I'd like
>to find if there's a way to fix it eventually, if at all possible.
Hmm. The stdin/out fds should be opened in hinfo_init since parent_alive
should be NULL. Is parent_alive non-NULL for some reason?
>Re signal handling, I do have the change, but it has some "emotional"
>problems I need to track down. I'll get to it after these changes are
>in a snapshot.
I don't think it's really important. But, of course, if we don't do
it, the first question on the cygwin mailing list after your patch is
applied will be something like "I'm trying to get my GLIP application
running using the snapshot from 12/7 and now I can't send any signals.
What gives?"
>A naive question -- how do I turn on tracing without running strace?
>In my particular case, strace invokes different behaviour since it's
>a mingw application, and I'd prefer not to change the source everytime
>I need to do some serious debugging.
If you run the application under gdb you can set strace_active=1 and
gdb will dump all of the messages to the screen. Otherwise, there is
no way that I know of.
Someone (Egor?) posted a patch to allow strace to attach to a running
process but I haven't applied it since I had a different method in mind.
cgf
- Raw text -