| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | using ctrlbrk() [or not] |
28 Sep 96 18:28, Paul Wankadia wrote to All:
> When I change the Ctrl-Break handler using ctrlbrk(), is there any
> easy way of just getting the system to IGNORE the Ctrl-Break, rather
> than getting the handler to longjmp() back to wherever I was (which
I don't even know what ctrlbrk() is (presumably something specific to
Borland's compilers?), but I can solve your problem with standard C code:
#include
#include
int main(void)
{
signal(SIGINT, SIG_IGN); /* initialise the SIGINT signal handler to
* ignore the interrupt signal */
while (1) /* infinite loop */
{
printf("The universe is neverending.\n");
}
return 0; /* due to the above infinite loop, this will
* never be called, but nevertheless some
* brain-dead compilers (eg. Microsoft
* QuickC) expect it */
}
Regards
Andrew
-- randy{at}zws.com
--- Msged/2 4.00
* Origin: Blizzard of Ozz, Melbourne, Australia (3:635/727.4{at}fidonet)SEEN-BY: 50/99 620/243 623/630 632/349 635/503 544 727 728 711/409 410 413 SEEN-BY: 711/430 808 809 932 934 712/515 713/888 714/906 800/1 @PATH: 635/727 544 50/99 711/808 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.