# HG changeset patch # User enz # Date 964036061 -3600 # Node ID d00adc26d77af054030f83dd9342d29a5a3cbd12 # Parent a0a96e1021c3d3e8feac649a19c4c6aa2ea8df85 [svn] Do not acquire global lock for prniting help diff -r a0a96e1021c3 -r d00adc26d77a ChangeLog --- a/ChangeLog Wed Jul 19 19:20:35 2000 +0100 +++ b/ChangeLog Wed Jul 19 20:47:41 2000 +0100 @@ -2,10 +2,9 @@ NOFFLE ChangeLog ------------------------------------------------------------------------------- -Fri Jul 14 2000 Matija Nalis +Wed Jul 19 2000 Markus Enzenberger - * Added counter for --fetch so one can see how much it is until the - end of the transfer. + * Do not acquire global lock for prniting help Fri Jul 14 2000 Matija Nalis diff -r a0a96e1021c3 -r d00adc26d77a src/noffle.c --- a/src/noffle.c Wed Jul 19 19:20:35 2000 +0100 +++ b/src/noffle.c Wed Jul 19 20:47:41 2000 +0100 @@ -10,7 +10,7 @@ received for some seconds (to allow multiple clients connect at the same time). - $Id: noffle.c 165 2000-06-25 18:42:10Z bears $ + $Id: noffle.c 176 2000-07-19 19:47:41Z enz $ */ #if HAVE_CONFIG_H @@ -55,7 +55,7 @@ Bool queryGrps; Bool queryDsc; Bool queryTimes; - Bool interactive; + Bool lockAtStartup; } noffle = { FALSE, FALSE, FALSE, TRUE }; static void @@ -573,13 +573,12 @@ } static Bool -initNoffle( Bool interactive ) +initNoffle( void ) { - Log_init( "noffle", interactive, LOG_NEWS ); + Log_init( "noffle", noffle.lockAtStartup, LOG_NEWS ); Cfg_read(); Log_dbg( "NOFFLE version %s", Cfg_version() ); - noffle.interactive = interactive; - if ( interactive ) + if ( noffle.lockAtStartup ) if ( ! Lock_openDatabases() ) return FALSE; enableCorefiles(); @@ -589,7 +588,7 @@ static void closeNoffle( void ) { - if ( noffle.interactive ) + if ( noffle.lockAtStartup ) Lock_closeDatabases(); } @@ -671,7 +670,8 @@ signal( SIGPIPE, logSignal ); c = getopt_long( argc, argv, "a:c:C:dD:efghlm:onpq:rRs:S:t:u:v", longOptions, NULL ); - if ( ! initNoffle( c != 'r' ) ) + noffle.lockAtStartup = ! ( c == 'r' || c == 'h' ); + if ( ! initNoffle() ) return EXIT_FAILURE; result = EXIT_SUCCESS; switch ( c )