Thanks for the useful note.
We currently catch ^C for OpenSM and OSMV to cleanup resources that would be
lost or create kernel oops. I guess that in Windows environment this is not
Also please note that we do use HUP signal to force a full sweep (will be
made available next OpenSM for Windoes release).
Your proposal of renaming the osm_signal_osd.h to osm_signal.h is fine.
From: Fab Tillier [mailto:***@silverstorm.com]
Sent: Tuesday, July 12, 2005 8:16 PM
To: 'Yossi Leybovich'
Cc: firstname.lastname@example.org; Windows Group; Eitan Zahavi; Aviram
Subject: RE: [patch] cl_signal_osd.h
Sent: Monday, July 11, 2005 10:45 PM
Post by Fab Tillier
What does cl_reg_sig_hdl map to for other platforms?
[YL] We have implementation of this function in our Linux compilb for both
Post by Fab Tillier
Windows and Linux, because our complib does not include any Linux
implementation I remove the code and left only direct call to signal .
But still to keep the same code base we need this function.
Why not just call signal directly?
[YL] as I explain in Linux complib we have other implementation.
We need it in order to keep the same code base
Is there a cl_signal.h file too, or just the cl_signal_osd.h file? If it's
the cl_signal_osd.h file, I'll rename it to cl_signal.h, and put it in
You do realize that ctrl-C signal handling has totally different semantics
Windows - there's a note in the MSDN docs warning about this:
"Note SIGINT is not supported for any Win32 application, including Windows
98/Me and Windows NT/2000/XP. When a CTRL+C interrupt occurs, Win32
systems generate a new thread to specifically handle that interrupt."
Take a look at SetConsoleCtrlHandler, as it should allow you to actually
implement the mask_sigint functionality by passing a NULL handler. The
SetConsoleCtrlHandler callback function also allows the application to
the behavior in response to the signal, which is probably something you want
do (to prevent the app from aborting, for example).
There doesn't be a function to unmask sigint - should there be one? If OSM
masks CTRL-C, why does it register for the SIGINT signal?
And lastly, please try to keep lines to 80 characters or less.