[openib-general] [PATCH] osm: OSM bug fix with --run-once option
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Sat Sep 9 23:35:54 PDT 2006
Hi Hal
This patch fixes the bug that was occurring when OSM was
running with --run-once option (-o) and the SM port was down.
In that case, OSM would be stuck in cond_wait forever (or until
the port will become active), and could not be terminated,
other than by SIGKILL.
Yevgeny
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
Index: opensm/main.c
===================================================================
--- opensm/main.c (revision 9354)
+++ opensm/main.c (working copy)
@@ -908,9 +908,13 @@ main(
if( run_once_flag == TRUE )
{
- status = osm_opensm_wait_for_subnet_up(
- &osm, EVENT_NO_TIMEOUT, TRUE );
- osm_exit_flag = 1;
+ while (!osm_exit_flag)
+ {
+ status = osm_opensm_wait_for_subnet_up(
+ &osm, osm.subn.opt.sweep_interval * 1000000, TRUE );
+ if (!status)
+ osm_exit_flag = 1;
+ }
}
else
{
More information about the general
mailing list