From: Hugh Sasse <hgs@dmu.ac.uk>
To: Mark Charney <mark_charney@yahoo.com>
Cc: cygwin@cygwin.com
Subject: Re: Control-c of a bat file does not kill commands run by bat file in some cases
Date: Fri, 18 Jul 2008 19:50:00 -0000 [thread overview]
Message-ID: <alpine.LFD.1.10.0807182043030.14074@trueman.cs.cse.dmu.ac.uk> (raw)
In-Reply-To: <99652.77639.qm@web51005.mail.re2.yahoo.com>
On Fri, 18 Jul 2008, Mark Charney wrote:
> Is this a bug or a feature?
>
> When I run a program loop.exe whose entire source is "int main()
> { while(1); return 0;}", compiled with MS VS8 or cygwin's gcc,
> from a bat file whose contents are just "loop.exe" and hit
> control-c while it is running, sometimes cygwin kills the loop.exe
> and sometimes it does not. Here are the 6 scenarios that I tried:
>
> 1. OKAY tcsh from a cmd.exe
> 2. OKAY bash from a cmd.exe
> 3. BROKEN tcsh from an rxvt X window on local machine
> 4. BROKEN bash from an rxvt X window on local machine
> 5. BROKEN tcsh via ssh from a remote machine (public key auth)
> 6. BROKEN bash via ssh from a remote machine (public key auth)
>
> OKAY means it kills the bat file and loop.exe
> BROKEN means loop.exe continues to run after control-c.
>
> bash/tcsh doesn't not seem to matter, I just did it because I first noticed the problem on tcsh.
Agreed.
The thing that is varying, it seems to me, is your perceived
terminal type. I mean as perceived by the system. Try the
3 ways of connecting {cmd, rxvt, ssh} against
stty -a
echo $TERM
to see what these things are. I think stty -a should suffice
to tell you what "intr" is. Or, in other words, you may have
to hit something other than <ctrl-C> to kill things, unless you
reset it with stty.
HTH
Hugh
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
next prev parent reply other threads:[~2008-07-18 19:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 16:46 Mark Charney
2008-07-18 17:13 ` Corinna Vinschen
2008-07-18 19:50 ` Hugh Sasse [this message]
2008-07-19 0:05 ` Brian Dessent
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.1.10.0807182043030.14074@trueman.cs.cse.dmu.ac.uk \
--to=hgs@dmu.ac.uk \
--cc=cygwin@cygwin.com \
--cc=mark_charney@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).