Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!ucsfcgl!cgl.ucsf.edu!kneller From: kneller@cgl.ucsf.edu (Don Kneller) Newsgroups: comp.sys.ibm.pc Subject: Re: Please help me with TC ssignal Message-ID: <11061@cgl.ucsf.EDU> Date: 28 Jul 88 20:08:06 GMT References: <1056@ndsuvax.UUCP> Sender: daemon@cgl.ucsf.edu Reply-To: kneller@socrates.ucsf.edu.UUCP (Don Kneller) Organization: UCSF Computer Graphics Lab Lines: 34 In article <1056@ndsuvax.UUCP> ncgus@ndsuvax.UUCP (Jim Gustafson) writes: > >Can someone explain why the following code works fine on a VAX 11/780 >but barfs (never exits loop) on an AST-286 running MSDOS 3.2 w/ TC V1.5? >Thanks. >#ifdef VAX ># define ssignal signal >#endif > >main() >{ > int cleanup(); > > ssignal(SIGINT, cleanup); > printf("Infinite Loop: hit ctl-c to enable SIGINT\n"); > for(;;) > ; Although not familiar with TC's ssignal() [ How does it differ from signal()? ] I think your problem is that, by default, DOS does not check for ^C unless it is doing IO (which your infinite loop is not doing). You can make DOS check for ^C "more often" by putting a "BREAK=on" line in your CONFIG.SYS file. That should fix your problem. BTW, does anyone know the difference between ^C and ^BREAK? I have found that if ^C is *not* the first character in the type-ahead buffer, DOS won't abort, but ^BREAK will always make DOS abort. Is this perhaps a function of my software buffer expander? - don ----- Don Kneller UUCP: ...ucbvax!ucsfcgl!kneller INTERNET: kneller@cgl.ucsf.edu BITNET: kneller@ucsfcgl.BITNET