Path: utzoo!utgpu!watmath!clyde!att!pacbell!ames!pasteur!ucbvax!POSTGRES.BERKELEY.EDU!dillon From: dillon@POSTGRES.BERKELEY.EDU (Matt Dillon) Newsgroups: comp.sys.amiga.tech Subject: Re: Break Signals Message-ID: <8811160739.AA25876@postgres.Berkeley.EDU> Date: 16 Nov 88 07:39:40 GMT Sender: usenet@ucbvax.BERKELEY.EDU Lines: 32 >How can I clear a break (i.e. ctrl-C, D, E, and F) from within my Aztec C >program? (Sometimes, a left-over break [i.e. CLI bug] is passed to a program >on startup. I would like to clear this signal before my program is instantly >killed.) Look in libraries/dos.h, the signal bits are 12, 13, 14, and 15 : SIGBREAKF_CTRL_C SIGBREAKF_CTRL_D SIGBREAKF_CTRL_E SIGBREAKF_CTRL_F The SetSignal() call may be used to clear/check the signals. The call takes two arguments, a signal-set and a signal-mask. To clear the four signals: #define SIGS (SIGBREAKF_CTRL_C|SIGBREAKF_CTRL_D|SIGBREAKF_CTRL_E|\ SIGBREAKF_CTRL_F) SetSignal(0L, SIGS); The current state of all EXEC signals may be read without clearing them with long State = SetSignal(0L, 0L); >Also, why are some of the signal definitions commented out in the Manx >signals.h file? > Jim Pritchett This has nothing to do with EXEC signals, but some internal scheme of Aztec's to try to mimic the UNIX signal mechanism. The commented out #defines are probably not implemented yet. -Matt