Signale
-
Hallo Forum,
unter Linux kann man Signale behandeln
Beispiel:/* Bei Segment Fault wird das Programm */ /* korrekt untergefahren. */ signal(SIGSEGV, sigsegv);
Gibt es sowas auch unter WIN32 ?
Danke im voraus, mfg Olli.
-
daa531 schrieb:
Hallo Forum,
unter Linux kann man Signale behandeln
Beispiel:/* Bei Segment Fault wird das Programm */ /* korrekt untergefahren. */ signal(SIGSEGV, sigsegv);
Gibts sowas auch unter WIN32 ?
Danke im voraus, mfg Olli.
-
Schau dir mal in der MSDN die Doku zu SetConsoleCtrlHandler() an
MfG SideWinder
-
Danke SideWinder.
Habe das mal schnell ueberflogen (muede), aber viele moeglichkeiten gibt es
unter Win32 nicht :(((Signal Meaning
CTRL_C_EVENT A CTRL+C signal was received, either from keyboard input or from a signal generated by the GenerateConsoleCtrlEvent function.
CTRL_BREAK_EVENT A CTRL+BREAK signal was received, either from keyboard input or from a signal generated by GenerateConsoleCtrlEvent.
CTRL_CLOSE_EVENT A signal that the system sends to all processes attached to a console when the user closes the console (either by clicking Close on the console window's window menu, or by clicking the End Task button command from Task Manager).
CTRL_LOGOFF_EVENT A signal that the system sends to all console processes when a user is logging off. This signal does not indicate which user is logging off, so no assumptions can be made.
Note that this signal is received only by services. Interactive applications are terminated at logoff, so they are not present when the system sends this signal.CTRL_SHUTDOWN_EVENT A signal that the system sends to all console processes when the system is shutting down.
Note that this signal is received only by services. Interactive applications are terminated at logoff, so they are not present when the system sends this signal. Services also have their own notification mechanism for shutdown events. For more information, see Handler.
[/msdn]
-
Braucht ja auch niemand mehr. Wenn du Interprozesskommunikation machen willst, dann mach das auch gefälligst ordentlich und missbrauche nicht Signale dazu.
MfG SideWinder