[openib-general] RE: opensm and signals

Eitan Zahavi eitan at mellanox.co.il
Mon Sep 12 01:00:16 PDT 2005


Hi Michael
pensm and signals
> 
> Hi, Hal, Eitan!
> Whats the reason opensm needs to catch and try to handle signals such as
SIGINT?
[EZ] The reason was way back some drivers had resource tracking problems. So
if OpenSM left without cleaning up all used resources (like MAD buffers and
UD-AVs) 
the driver oops'ed.
> It seems that we can let the default handler simply kill the application.
> If this is required for some vendor layer, shouldnt the signal
> handling be part of that vendor layer?
I will be glad to remove that code...
> 
> Please note that glibc manual says
> 
> http://www.gnu.org/software/libc/manual/html_node/Defining-Handlers.html
> 
> "You need to take special care in writing handler functions because they
> can be called asynchronously. That is, a handler might be called at any
> point in the program, unpredictably."
> 
> and
> 
> "The best practice is to write a handler that does nothing but set an
> external variable that the program checks regularly, and leave all
> serious work to the program."
[EZ] This is exactly what the handler does - set osm_exit_flag ...
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20050912/4549ce29/attachment.html>


More information about the general mailing list