[ovs-dev] [PATCH 1/5] fatal-signal: Fatal signal handling for Windows.
Ben Pfaff
blp at nicira.com
Wed Feb 26 19:24:17 UTC 2014
On Wed, Feb 26, 2014 at 10:51:56AM -0800, Gurucharan Shetty wrote:
> Windows does not have a SIGHUP or SIGALRM. It does have
> a SIGINT and SIGTERM. The documentation at msdn says that
> SIGINT is not supported for win32 applications because
> WIN32 operating systems generate a new thread to specifically
> handle Ctrl+C.
>
> This commit handles SIGTERM for Windows. The documentation also
> states that nothing generates SIGTERM in Windows, but one can
> use raise(SIGTERM) to manage it. The idea for handling SIGTERM
> for Windows is to just have a place holder if there is need to
> raise() a signal for some other purpose.
>
> We use SIGALRM in timeval.c if we wake up from a sleep after
> 'deadline'. For Windows, print an error message and then
> use SIGTERM.
>
> There is an atexit() function for Windows, so we can call cleanup
> functions during exit.
>
> An upcoming commit separately handles Ctrl+C so that we can call
> clean up functions for that use case.
>
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
Was the VLOG_ERR in time_poll() added as part of debugging, or do you
really want it to be part of the tree?
Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev
mailing list