This is the mail archive of the cygwin@cygwin.com 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: bash/cmd CTRL-C problem...


----- Original Message -----
From: "Christopher Faylor" <cgf@redhat.com>


> On Wed, Jan 09, 2002 at 11:57:04AM +1100, Robert Collins wrote:
> >----- Original Message -----
> >From: "Christopher Faylor" <cgf@redhat.com>
> >
> >> So, I think the easiest fix for the current problem is just to do a
> >> 'signal (SIGINT, SIG_IGN)' prior to calling CreateProcess,
restoring
> >> the previous signal handler if the CreateProcess fails.
> >
> >You do realise, that thats what I've done, but via the more efficient
> >way of returning TRUE to the signal.
>
> Sure.  I understand what you are doing.  It usually only takes me a
> couple of tries to "get it".

:}. Lol.

> I'm specifically trying not to do the "TRUE" thing, though, since
AFAICT
> it isn't always appropriate.

If you want to SIG_IGN the signal, then it is:
"When a CTRL+C signal is received, the control handler returns TRUE,
indicating that it has handled the signal. Doing this prevents other
control handlers from being called."
(note that this is within this process only).

> For the record, I really appreciate your tracking this down.  I
finally
> understand the issues here.  These issues have been around for a long
time
> and the problems that you uncovered are probably responsible for some
> longstanding cygwin strangeness.

No probs.

Rob


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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