[ofa-general] [PATCH] opensm: complib_init() after block_signals()
Sasha Khapyorsky
sashak at voltaire.com
Tue Mar 20 18:23:55 PDT 2007
Move complib_init() call where timer thread is created after
block_signals(), so timer thread will not run signal handlers.
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
osm/opensm/main.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/osm/opensm/main.c b/osm/opensm/main.c
index 511df46..f572744 100644
--- a/osm/opensm/main.c
+++ b/osm/opensm/main.c
@@ -316,7 +316,7 @@ show_usage(void)
printf( "-?\n"
" Display this usage info then exit.\n\n" );
fflush( stdout );
- osm_exit_flag = 1;
+ exit(2);
}
/**********************************************************************
@@ -593,8 +593,6 @@ main(
{ NULL, 0, NULL, 0 } /* Required at the end of the array */
};
- complib_init();
-
/* Make sure that the opensm and complib were compiled using
same modes (debug/free) */
if ( osm_is_debug() != cl_is_debug() )
@@ -872,11 +870,6 @@ main(
}
while(next_option != -1);
- if (osm_exit_flag) {
- complib_exit();
- return( 0 );
- }
-
if (opt.log_file != NULL )
printf(" Log File: %s\n", opt.log_file );
/* Done with options description */
@@ -889,6 +882,8 @@ main(
block_signals();
+ complib_init();
+
status = osm_opensm_init( &osm, &opt );
if( status != IB_SUCCESS )
{
--
1.5.0.3.401.g27ebd
More information about the general
mailing list