Changeset 12000


Ignore:
Timestamp:
Feb 20, 2011, 7:12:45 PM (11 years ago)
Author:
jordan
Message:

(trunk libT) ensure that the last few log messages actually get logged before shutdown finishes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/daemon/daemon.c

    r11973 r12000  
    540540    }
    541541
    542     /* shutdown */
    543 #if HAVE_SYSLOG
    544     if( !foreground )
    545     {
    546         syslog( LOG_INFO, "%s", "Closing session" );
    547         closelog( );
    548     }
    549 #endif
    550 
    551542    printf( "Closing transmission session..." );
    552543    tr_sessionSaveSettings( mySession, configDir, &settings );
    553544    dtr_watchdir_free( watchdir );
    554545    tr_sessionClose( mySession );
     546    pumpLogMessages( logfile );
    555547    printf( " done.\n" );
     548
     549    /* shutdown */
     550#if HAVE_SYSLOG
     551    if( !foreground )
     552    {
     553        syslog( LOG_INFO, "%s", "Closing session" );
     554        closelog( );
     555    }
     556#endif
    556557
    557558    /* cleanup */
Note: See TracChangeset for help on using the changeset viewer.