C# Класс winsw.Util.SigIntHelper

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
SendSIGINTToProcess ( Process process, System.TimeSpan shutdownTimeout ) : bool

Uses the native funciton "AttachConsole" to attach the thread to the executing process to try to trigger a CTRL_C event (SIGINT). If the application doesn't honor the event and shut down gracefully, the. wait period will time out after 15 seconds.

Приватные методы

Метод Описание
AttachConsole ( uint dwProcessId ) : bool
FreeConsole ( ) : bool
GenerateConsoleCtrlEvent ( CtrlTypes dwCtrlEvent, uint dwProcessGroupId ) : bool
SetConsoleCtrlHandler ( ConsoleCtrlDelegate HandlerRoutine, bool Add ) : bool

Описание методов

SendSIGINTToProcess() публичный статический Метод

Uses the native funciton "AttachConsole" to attach the thread to the executing process to try to trigger a CTRL_C event (SIGINT). If the application doesn't honor the event and shut down gracefully, the. wait period will time out after 15 seconds.
public static SendSIGINTToProcess ( Process process, System.TimeSpan shutdownTimeout ) : bool
process System.Diagnostics.Process The process to attach to and send the SIGINT
shutdownTimeout System.TimeSpan
Результат bool