Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to Disable CTRL-C key in djgpp compiler

4 views
Skip to first unread message

ahmadfi...@gmail.com

unread,
Jul 24, 2008, 3:56:13 AM7/24/08
to
can some one please tell me which interrupts have to be passed in
order to disable CTRL-C key in DJGPP compiler? i had used
_djgpp_hwint_flags =1 in order to disable it but it doesnt seem to work

Gisle Vanem

unread,
Jul 24, 2008, 4:31:37 AM7/24/08
to
<ahmadfi...@gmail.com> wrote:

Lookup __djgpp_set_ctrl_c() and _go32_want_ctrl_break()
in the info-docs.

--gv

Rod Pemberton

unread,
Jul 24, 2008, 5:50:56 PM7/24/08
to
<ahmadfi...@gmail.com> wrote in message
news:93f87030-05f1-40a9...@p10g2000prf.googlegroups.com...

> can some one please tell me which interrupts have to be passed in
> order to disable CTRL-C key in DJGPP compiler? i had used
> _djgpp_hwint_flags =1 in order to disable it but it doesnt seem to work

I had lots of problems getting CTRL-C to disable completely in DJGPP. Most
of the methods in the doc's seem to allow some CTRL-C's to pass through
every now and then, or they'll still display ^C on the screen, etc. The
method that has worked best for me:

signal(SIGQUIT,SIG_IGN);
signal(SIGINT,SIG_IGN);
signal(SIGABRT,SIG_IGN);
setcbrk(0);

HTH,


Rod Pemberton

ahmadfi...@gmail.com

unread,
Jul 28, 2008, 2:11:17 AM7/28/08
to
On Jul 25, 2:50 am, "Rod Pemberton" <do_not_h...@nohavenot.cmm> wrote:
> <ahmadfirdau...@gmail.com> wrote in message

>
> news:93f87030-05f1-40a9...@p10g2000prf.googlegroups.com...
>
> > can some one please tell me which interrupts have to be passed in
> > order to disableCTRL-Ckey inDJGPPcompiler? i had used

> > _djgpp_hwint_flags =1 in order to disable it but it doesnt seem to work
>
> I had lots of problems gettingCTRL-Cto disable completely inDJGPP. Most
> of the methods in the doc's seem to allow someCTRL-C'sto pass through
> every now and then, or they'll still display ^Con the screen, etc. The

> method that has worked best for me:
>
> signal(SIGQUIT,SIG_IGN);
> signal(SIGINT,SIG_IGN);
> signal(SIGABRT,SIG_IGN);
> setcbrk(0);
>
> HTH,
>
> Rod Pemberton

Hi Gisle,Rod,
Thanks a lot for helping me out. Actually despite using the methods
you had suggested i am still facing issues
. When i press ctrl-c it still displays ^C on the screen. Is that
inevitable???
Thanks
Ahmad Firdaus

pe...@nospam.demon.co.uk

unread,
Jul 28, 2008, 2:45:37 PM7/28/08
to
In article <14dd9629-c856-488f...@z26g2000pre.googlegroups.com>
ahmadfi...@gmail.com writes:

In which case write your own critical error handler. See Int 23h
(RBIL is a good starting point).

Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."

Rod Pemberton

unread,
Jul 30, 2008, 3:05:46 AM7/30/08
to
<ahmadfi...@gmail.com> wrote in message
news:14dd9629-c856-488f...@z26g2000pre.googlegroups.com...

> Hi Gisle,Rod,
> Thanks a lot for helping me out. Actually despite using the methods
> you had suggested i am still facing issues
> . When i press ctrl-c it still displays ^C on the screen. Is that
> inevitable???

Sorry to hear that... It seems to work well for me.

There is a newsgroup for DJGPP: comp.os.msdos.djgpp. I didn't see a post
from you there.


Rod Pemberton

Rod Pemberton

unread,
Sep 28, 2008, 8:21:58 AM9/28/08
to

"Rod Pemberton" <do_no...@nohavenot.cmm> wrote in message
news:g6p3um$msc$1...@aioe.org...

You might also try:

__djgpp_exception_toggle();


RP

0 new messages