TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Peter Fitzsimmons
from: Thomas Seeling
date: 1996-07-07 13:01:30
subject: ctrl-c?

Hallo, Peter!

*** Am Freitag 05. Juli 1996 um 20:22 schrieb Peter Fitzsimmons an Udo Van
Den Heuvel:

[signal handling, ^C]
 PF> static int handler(void)     /* Function called for ^C signal */ {
 PF>     signal(SIGINT, SIG_IGN); /* Disallow CTRL + C during handler   */
 PF>     brk_trapped++;
 PF>     signal(SIGINT,handler);
 PF>     return(0);
 PF> }


The handling of signals depends on what the compiler supports. There is
BSD-style, SysV-style and some other ways to do a signal handler.

Some automatically block signals until the handler is left and then unblock
it without an explicit call (BSD and POSIX.1), SysV requires the programmer
to re-install the signal handler somewhere in the handler (on delivery the
signal is set to SIG_DFL), and the emx internal way of handling things is
that the signal is blocked and must explicitly unblocked by doing
signal(signo, SIG_ACK).

Other compilers may vary, as might the prototype for a signal handling
function; usually is is of type void (*)(int), not int (*)(void).


Tschau...Thomas

--- E3-32/1.11-32/2.50+
* Origin: Die TeX-Box +49-6034-930021 V.34 -930022 ISDN 24h (2:244/1130.42)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 517 628 713/888 800/1
@PATH: 244/1130 24/999 888 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.