This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Ash spawning win32 programs (was Re: bash/cmd CTRL-C problem...)

At 11:11 PM 1/11/2002 +1100, Robert Collins wrote:
>Can I suggest you start a new thread when the topic changes, it helps
>prevent confusion - particulary if the original thread hangs around.

Sorry. I thought the two might be related.

> > Interactive bash shell starts:
> >          -> shell script using ash starts:
> >                  -> java program
> >
> > ^C-ing the script does not have any visible effect (i.e. the java
> > is not killed). As noted previously this problem is resolved if you
> > /bin/sh be bash rather than ash.
>Hmm. I'll look into this is you will :}.


>I suspect that ash uses vfork rather than fork+exec to start it's child
>process's. That may result in no cygwin stub existing.
>here's what you need to do:
>write an ash script that prints out it's pid, and (if you can get it)
>the cygwin pid of the java program.
>Start the ash script in the background, and then use ps. See if the java
>program appears in ps. If it does - check via task manager or process
>explorer to see if the reported cygwin pid is the same as the actual
>java.exe pid.
>If it doesn't appear, then no cygwin stub exists, and quite some work
>may be needed to *efficiently* create such a virtual process. (it would
>be quite trivial via the daemon :})
>If it does appear, and the shown cygwin pid is the same as the java.exe
>pid, then no stub exists, but the bulk of the code to have a 'virtual'
>process is there, but signals aren't working correctly.
>If it does appear, and the shown cygwin pid is different than the actual
>java.exe pid, then there is a stub, and things should be working
>correctly - I'll take a direct look at this point.

Ok thanks. I'll see what I can do.


Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]