[comp.os.msdos.programmer] Turbo C 1.5 ssignal

holbrook@Alliant.COM (Mark Holbrook) (08/09/90)

The Turbo C version 1.5 ssignal() function seems to be like the
signal() function in other C compilers, but doesn't seem to intercept
signals the way signal() does (at least for ssignal() on my PC vs.
signal() on a real UNIX machine).  For example, if I define a routine
"fpe" to handle floating point exceptions, then use ssignal(SIGFPE,
fpe) to establish fpe() as the handler, and then execute, say, a floating
point divide-by-zero, I get the standard Turbo C error message rather
than whatever fpe() does.

Any advice?  Do I need 2.0?  Is there something I'm not doing right?

(The above question comes from trying to get gnuplot v. 2.0 compiled
and running on a 286 clone with Hercules graphics.  Some #ifdef __TURBOC__
code includes calls to signal(), which I (TC 1.5) don't have.)

Mark Holbrook

Alliant Computer Systems Corporation     Phone: (508) 486-1262
1 Monarch Drive                            FAX: (508) 486-1398
Littleton, MA 01460                     E-mail: holbrook@alliant.COM

eric@mks.mks.com (Eric Gisin) (08/09/90)

Gsignal and ssignal are a software signal package derived
from System V.  Ssignal installs a handler, and gsignal
generates a signal. These signals are never generated by
faults, traps, or interrupts. That's how it worked in System V.