Changeset 9358
- Timestamp:
- Oct 22, 2009, 2:25:26 AM (13 years ago)
- Location:
- branches/1.7x
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.7x/NEWS
r9357 r9358 4 4 * Use automake's "quieter builds" rule when available 5 5 ==== GTK+ ==== 6 * Fix broken SIGINT (ctrl-c) handling 7 * Fix tray menu's main window status when Transmission is started minimized 6 8 * Fix 1.61 build failure on systems with new versions of glib but older versions of gtk 7 * Fix tray menu's main window status when Transmission is started minimized8 9 9 10 === Transmission 1.75 (2009/09/13) === -
branches/1.7x/gtk/main.c
r9357 r9358 260 260 261 261 static sig_atomic_t global_sigcount = 0; 262 263 static void 264 fatalsig( int sig ) 265 { 266 /* revert to default handler after this many */ 267 static const int SIGCOUNT_MAX = 3; 268 269 if( ++global_sigcount >= SIGCOUNT_MAX ) 262 static struct cbdata * sighandler_cbdata = NULL; 263 264 static void 265 signal_handler( int sig ) 266 { 267 if( ++global_sigcount > 1 ) 270 268 { 271 269 signal( sig, SIG_DFL ); 272 270 raise( sig ); 273 271 } 272 else switch( sig ) 273 { 274 case SIGINT: 275 g_message( _( "Got signal %d; trying to shut down cleanly. Do it again if it gets stuck." ), sig ); 276 doAction( "quit", sighandler_cbdata ); 277 break; 278 } 274 279 } 275 280 … … 277 282 setupsighandlers( void ) 278 283 { 279 #ifdef G_OS_WIN32 280 const int sigs[] = { SIGINT, SIGTERM }; 281 #else 282 const int sigs[] = { SIGHUP, SIGINT, SIGQUIT, SIGTERM }; 283 #endif 284 guint i; 285 286 for( i = 0; i < G_N_ELEMENTS( sigs ); ++i ) 287 signal( sigs[i], fatalsig ); 284 signal( SIGINT, signal_handler ); 288 285 } 289 286 … … 435 432 struct cbdata * cbdata = g_new0( struct cbdata, 1 ); 436 433 434 sighandler_cbdata = cbdata; 435 437 436 /* ensure the directories are created */ 438 if(( str = pref_string_get( PREF_KEY_DIR_WATCH )))439 gtr_mkdir_with_parents( str, 0777 );440 if(( str = pref_string_get( TR_PREFS_KEY_DOWNLOAD_DIR )))441 gtr_mkdir_with_parents( str, 0777 );437 if(( str = pref_string_get( PREF_KEY_DIR_WATCH ))) 438 gtr_mkdir_with_parents( str, 0777 ); 439 if(( str = pref_string_get( TR_PREFS_KEY_DOWNLOAD_DIR ))) 440 gtr_mkdir_with_parents( str, 0777 ); 442 441 443 442 /* initialize the libtransmission session */
Note: See TracChangeset
for help on using the changeset viewer.