🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.os.msdos.programmer
2 messages
2 total messages Started by John Vinopal Tue, 24 Jul 1990 18:46
SIGNAL Inconsistancy Question
#1659
Author: John Vinopal
Date: Tue, 24 Jul 1990 18:46
7 lines
693 bytes
	I'm playing with signal() on several systems.  Anyone have
	a quick answer why TC++ 1.0 chooses to define SIGABRT as 22
	while most other systems use 6?  And why does Microsoft and
	Turbo reset the signal handler after one call?  

					johnv@metaware.com
Re: SIGNAL Inconsistancy Question
#1687
Author: Larry A. Shurr
Date: Wed, 25 Jul 1990 17:32
34 lines
2490 bytes
In article <548@metaware.metaware.com> johnv@metaware.UUCP (John Vinopal) writes:
>	I'm playing with signal() on several systems.  Anyone have
>	a quick answer why TC++ 1.0 chooses to define SIGABRT as 22
>	while most other systems use 6?  And why does Microsoft and
>	Turbo reset the signal handler after one call?  

OK, I don't speak for Borland, these are my speculations, but...

SIGABRT may be defined as other-than-6 in an effort to avoid conflict with 
the signal number assignments used in UNIX as they (Borland) understood them.
The other signals they define in signal.h match their Unix counterparts
whereas SIGABRT does not.  However, SIGABRT is new.  My not-necessarily-up-
to-date Programmer's Reference Manual shows no SIGABRT definition, but does
show that SIGIOT is defined with the value 6.  iHowever, a quick peek at
/usr/include/sys/signal.h shows both SIGIOT and SIGABRT defined as 6 with
a comment for SIGABRT of "/* used by abort, replace SIGIOT in the future */."

So Borland may have thought they were avoiding conflicting with "the stan-
dard."  If so, we know they failed, but they failed not once, but twice 
because 22 is the value of SIGPOLL, supported by the relatively new STREAMS 
device driver interface to signal STREAMS I/O events pending... oops.

As for your second question, MSoft and Borland are almost certainly emulating
the signal(2) interface as defined in Unix.  If a signal handler is set by 
using signal(), the signal action reverts to SIG_DFL when the handler is
called.  In order to have your signal handler remain as the selected action 
instead of being reset, you must use the newer (Release 3) sigset(2) 
interface.

regards, Larry
-- 
Larry A. Shurr (cbnmva!las@att.ATT.COM or att!cbnmva!las)
The end of the world has been delayed due to a shortage of trumpet players.
(The above reflects my opinions, not those of AGS or AT&T, but you knew that.)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads