Mail Archives: djgpp/1996/05/22/12:26:03
On Mon, 20 May 1996, Shawn Hargreaves wrote:
> On a related note, I can't get setcbrk() to do anything. My understanding
> is that calling setcbrk(0) should prevent ctrl+break from killing my
> program off, but it doesn't work...
The on-line docs clearly says that this function determines C-Break
checking flag in MS-DOS.
^^^^^^^^^
That flag merely interrupts DOS operations (like disk I/O or character
device I/O), but doesn't abort your program. If you want to control
whether your program is interrupted by C-Break, write
signal(SIGINT, SIG_IGN), as God intended.
- Raw text -