Signal handler

Hi,

I need to construct a kind of signal handler to
specify further module behavior after particular
signal has been caught, e.g. SIGINT.

The problem is SIGINT normally raised by CONTROL-C keyb. interrupt e.g.
on UNIX systems generally is not supported on Win32, according to MSDN info
the signal stuff has been designed to achive a kind of
compatibility issue with ANSI standard.

But…, how could I catch CONTROL-C interrupt signal on Win32 anyway?

v.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> The problem is SIGINT normally raised by CONTROL-C keyb. interrupt e.g.

on UNIX systems generally is not supported on Win32, according to MSDN
info
the signal stuff has been designed to achive a kind of
compatibility issue with ANSI standard.

There is NO signals in Win32. NT’s POSIX subsystem uses signals, but NOT
Win32.
There is no SIGKILL, SIGTERM, SIGSTOP, SIGBUG, SIGSEGV etc in Win32.
There is no kill() and signal() functions. Just forget about this stuff.
Win32 has AV fault exception except of SIGSEGV and inpage error exception
except of SIGBUS.

But…, how could I catch CONTROL-C interrupt signal on Win32 anyway?

There was a Win32 function named like SetConsoleCtrlCHandler or such.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

While there are no signals in Win32, you do have structured exception
handling. You can find that in the MSDN library Platform SDK under Base
Services | Debugging and Error Handling
(http://msdn.microsoft.com/library/psdk/winbase/structex_03xj.htm).

For CTRL-C handling, check out SetConsoleCtrlHandler() in MSDN
(http://msdn.microsoft.com/library/psdk/winbase/conchar_599u.htm).

  • Danilo

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Burkin, Valery
Sent: Wednesday, April 11, 2001 6:57 AM
To: NT Developers Interest List
Subject: [ntdev] Signal handler

Hi,

I need to construct a kind of signal handler to
specify further module behavior after particular
signal has been caught, e.g. SIGINT.

The problem is SIGINT normally raised by CONTROL-C keyb. interrupt e.g.
on UNIX systems generally is not supported on Win32, according to
MSDN info
the signal stuff has been designed to achive a kind of
compatibility issue with ANSI standard.

But…, how could I catch CONTROL-C interrupt signal on Win32 anyway?

v.


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com