| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | BCOS2 signal() |
Hello Paul!
I was searching through some saved messaged looking for the number to
subscribe to DevCon :-) and found this.
ac> I use Borland C++ for OS/2 1.0. I haven't come across any bugs, but then
ac> I haven't pushed it very far. Are there any bugs I should be aware of?
PE> From the top of my head,
PE>
PE> 1. setvbuf with values greater than 64k fail.
PE>
PE> 2. The example program in the Borland book on how to use signal()
PE> doesn't compile, and obviously when you're trying to use it in
PE> real life (e.g. trying to recompile zip/unzip I think it was), it
PE> fails.
The below example from BCOS2 v2.0, as you posted, it does not compile, but I
made two changes below and it compiles... and.. works! :-)
/* This example installs a signal handler routine to be run when Ctrl-Break
is pressed. */
#include
#include
#include
void catcher(void)
{
printf("\nNow in break routine\n");
exit(1);
}
int main(void) {
//signal(SIGFPE, (void (cdecl *) (int)) catcher); // won't compile
signal(SIGINT, catcher); // will compile, SIGINT
for (;;)
printf("\nIn main() program\n");
}
Weird, huh? :-)
phil.crown{at}bluecafe.com
--- Blue Wave/Max v2.22a
* Origin: * MacSavvy * Dallas * Mac * OS/2 * (214)250-4479 * (1:124/1208)SEEN-BY: 270/101 620/243 711/401 409 410 413 430 807 808 809 934 955 712/407 SEEN-BY: 712/515 517 628 713/888 800/1 7877/2809 @PATH: 124/1208 1 396/1 270/101 712/515 711/808 809 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™.