delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/12/04/21:46:10

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-developers-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Date: Sat, 4 Dec 1999 21:45:52 -0500
From: Chris Faylor <cgf AT cygnus DOT com>
To: Mumit Khan <khan AT nanotech DOT wisc DOT edu>
Cc: cygwin-developers AT sourceware DOT cygnus DOT com
Subject: Re: (patch) winsup noncygwin mess cleanup
Message-ID: <19991204214552.A10152@cygnus.com>
Mail-Followup-To: Mumit Khan <khan AT nanotech DOT wisc DOT edu>,
cygwin-developers AT sourceware DOT cygnus DOT com
References: <19991204211929 DOT A10029 AT cygnus DOT com> <199912050236 DOT UAA01287 AT mercury DOT xraylith DOT wisc DOT edu>
Mime-Version: 1.0
X-Mailer: Mutt 1.0i
In-Reply-To: <199912050236.UAA01287@mercury.xraylith.wisc.edu>; from khan@nanotech.wisc.edu on Sat, Dec 04, 1999 at 08:36:44PM -0600

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019