<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>RE: [patch] cl_signal_osd.h</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Hi Fab,</FONT>
</P>

<P><FONT SIZE=2>Thanks for the useful note. </FONT>
<BR><FONT SIZE=2>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.</FONT></P>

<P><FONT SIZE=2>Also please note that we do use HUP signal to force a full sweep (will be made available next OpenSM for Windoes release).</FONT></P>

<P><FONT SIZE=2>Your proposal of renaming the osm_signal_osd.h to osm_signal.h is fine.</FONT>
</P>

<P><FONT SIZE=2>Eitan</FONT>
</P>
<BR>

<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Fab Tillier [<A HREF="mailto:ftillier@silverstorm.com">mailto:ftillier@silverstorm.com</A>]</FONT>
<BR><FONT SIZE=2>Sent: Tuesday, July 12, 2005 8:16 PM</FONT>
<BR><FONT SIZE=2>To: 'Yossi Leybovich'</FONT>
<BR><FONT SIZE=2>Cc: openib-windows@openib.org; Windows Group; Eitan Zahavi; Aviram</FONT>
<BR><FONT SIZE=2>Gutman</FONT>
<BR><FONT SIZE=2>Subject: RE: [patch] cl_signal_osd.h</FONT>
</P>
<BR>

<P><FONT SIZE=2>> From: Yossi Leybovich [<A HREF="mailto:sleybo@mellanox.co.il">mailto:sleybo@mellanox.co.il</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Monday, July 11, 2005 10:45 PM</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> > What does cl_reg_sig_hdl map to for other platforms?</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> [YL] We have implementation of this function in our Linux compilb for both</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> > Windows and Linux, because our complib does not include any Linux</FONT>
<BR><FONT SIZE=2>> > implementation I remove the code and left only direct call to signal .</FONT>
<BR><FONT SIZE=2>> > But still to keep the same code base we need this function.</FONT>
<BR><FONT SIZE=2>> > Why not just call signal directly?</FONT>
<BR><FONT SIZE=2>></FONT>
<BR><FONT SIZE=2>> [YL] as I explain in Linux complib we have other implementation.</FONT>
<BR><FONT SIZE=2>> We need it in order to keep the same code base</FONT>
</P>

<P><FONT SIZE=2>Is there a cl_signal.h file too, or just the cl_signal_osd.h file?  If it's just</FONT>
<BR><FONT SIZE=2>the cl_signal_osd.h file, I'll rename it to cl_signal.h, and put it in</FONT>
<BR><FONT SIZE=2>inc\user\complib.</FONT>
</P>

<P><FONT SIZE=2>You do realize that ctrl-C signal handling has totally different semantics in</FONT>
<BR><FONT SIZE=2>Windows - there's a note in the MSDN docs warning about this:</FONT>
</P>

<P><FONT SIZE=2>"Note   SIGINT is not supported for any Win32 application, including Windows</FONT>
<BR><FONT SIZE=2>98/Me and Windows NT/2000/XP. When a CTRL+C interrupt occurs, Win32 operating</FONT>
<BR><FONT SIZE=2>systems generate a new thread to specifically handle that interrupt."</FONT>
</P>

<P><FONT SIZE=2>Take a look at SetConsoleCtrlHandler, as it should allow you to actually</FONT>
<BR><FONT SIZE=2>implement the mask_sigint functionality by passing a NULL handler.  The</FONT>
<BR><FONT SIZE=2>SetConsoleCtrlHandler callback function also allows the application to control</FONT>
<BR><FONT SIZE=2>the behavior in response to the signal, which is probably something you want to</FONT>
<BR><FONT SIZE=2>do (to prevent the app from aborting, for example).</FONT>
</P>

<P><FONT SIZE=2>There doesn't be a function to unmask sigint - should there be one?  If OSM</FONT>
<BR><FONT SIZE=2>masks CTRL-C, why does it register for the SIGINT signal?</FONT>
</P>

<P><FONT SIZE=2>And lastly, please try to keep lines to 80 characters or less.</FONT>
</P>

<P><FONT SIZE=2>Thanks,</FONT>
</P>

<P><FONT SIZE=2>- Fab</FONT>
</P>

</BODY>
</HTML>