[Openib-windows] RE: [patch] cl_signal_osd.h

Eitan Zahavi eitan at mellanox.co.il
Tue Jul 12 23:39:28 PDT 2005


Hi Fab,

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
a must.

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.

Eitan


-----Original Message-----
From: Fab Tillier [mailto:ftillier at silverstorm.com]
Sent: Tuesday, July 12, 2005 8:16 PM
To: 'Yossi Leybovich'
Cc: openib-windows at openib.org; Windows Group; Eitan Zahavi; Aviram
Gutman
Subject: RE: [patch] cl_signal_osd.h


> From: Yossi Leybovich [mailto:sleybo at mellanox.co.il]
> Sent: Monday, July 11, 2005 10:45 PM
> 
> > What does cl_reg_sig_hdl map to for other platforms?
>
> [YL] We have implementation of this function in our Linux compilb for both
>
> > 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
just
the cl_signal_osd.h file, I'll rename it to cl_signal.h, and put it in
inc\user\complib.

You do realize that ctrl-C signal handling has totally different semantics
in
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
operating
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
control
the behavior in response to the signal, which is probably something you want
to
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.

Thanks,

- Fab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20050713/cd4ba9b1/attachment.html>


More information about the ofw mailing list