Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!pasteur!ucbvax!dewey.soe.berkeley.edu!oster From: oster@dewey.soe.berkeley.edu (David Phillip Oster) Newsgroups: comp.sys.mac.programmer Subject: Re: LSC 3.0 & signal Keywords: LSC Message-ID: <27837@ucbvax.BERKELEY.EDU> Date: 31 Jan 89 07:37:32 GMT References: <4256@hubcap.UUCP> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: oster@dewey.soe.berkeley.edu.UUCP (David Phillip Oster) Organization: School of Education, UC-Berkeley Lines: 13 In article <4256@hubcap.UUCP> mikeoro@hubcap.UUCP (Michael K O'Rourke) writes: >I think a friend of mine found a bug in LSC 3.0. We were porting a program >from the VAX running Unix to the Mac. It was a very simple shell that used >the signal command to jump out whenever control c was hit. Unix is not the natural universe! Nowhere in the C standard does it say that control-c generates a signal. That is a feature provided by some tty drivers under some versions of unix. If you write a terminal driver for the stdio section of lightspeed C, you can make it generate a signal when you type a control-c also. (Also, remember that unix tty drivers run off of serial interrupts, so the signal will be generated even if your C program is infinite looping. Handling the keyboard at interrupt level is normally not in the domain of a user program on the mac.)