www.delorie.com/djgpp/bugs/show.cgi   search  
Bug 000023

When Created: 09/12/1995 01:24:36
Against DJGPP version: 2.00.beta3
By whom: paag@tid.es
Abstract: setcbrk() won't disable the ^C signal interrupt
When I used DJGPP v2.00beta3 to recompile the MicroEMACS 3.12 code
I have already running with DJGPP v1.12, 
setcbrk() doesn't disable the ^C interrupt. 

Workaround added: 10/04/1995 18:05:00
By whom:
Use the DJGPP interrupt functions to create an interrupt handler for ctrl-break
that should work... (i think)

Note added: 10/08/1995 21:05:13
By whom: dj@delorie.com
use setmode(fileno(stdin), O_BINARY) to put stdin in binary mode, and then
Ctrl-C is just a regular keystroke.  setcbrk() is only for Control-Break,
although that appears to not do what you expect either at the moment :-(


Fixed in version 2.00.beta4 on 10/08/1995 21:05:19
By whom:

Workaround added: 01/15/1996 02:20:33
By whom: paag@tid.es
Since setcbrk(0) doesn't disable the SIGINT signal when reading keystrokes
with getkey() or getxkey(), I tried to disable that signal by ignoring it

This workaround fixes the problem. getkey returns 3 for ^C and 256 for 
Ctrl-Break and no signals are generated. I suggest to include a not in
getcbrk(), setcbrk(), getkey() and getxkey() to make people aware of the
problem and this workaround.

  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2010   by DJ Delorie     Updated Jul 2010