Author: sh-sh-sh Date: Wed Jan 9 12:04:06 2008 New Revision: 43487 URL: http://svn.opensuse.org/viewcvs/yast?rev=43487&view=rev Log: fixed segfault upon terminate on single CPU machines Modified: trunk/core/libyui/src/YUI_core.cc Modified: trunk/core/libyui/src/YUI_core.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/core/libyui/src/YUI_core.cc?rev=43487&r1=43486&r2=43487&view=diff ============================================================================== --- trunk/core/libyui/src/YUI_core.cc (original) +++ trunk/core/libyui/src/YUI_core.cc Wed Jan 9 12:04:06 2008 @@ -206,6 +206,8 @@ y2debug( "Telling UI thread to shut down" ); terminate_ui_thread = true; signalUIThread(); + y2debug( "Waiting for UI thread to shut down" ); + waitForUIThread(); pthread_join( ui_thread, 0 ); y2debug( "UI thread shut down correctly" ); } @@ -353,7 +355,7 @@ idleLoop ( pipe_to_ui[0] ); // The pipe is non-blocking, so we have to check if we really read a - // signal byte. Although idleLoop already makes a select, this seems to + // signal byte. Although idleLoop already does a select(), this seems to // be necessary. Anyway: Why do we set the pipe to non-blocking if we // wait in idleLoop for it to become readable? It is needed in // YUIQt::idleLoop for QSocketNotifier. @@ -362,7 +364,12 @@ continue; if ( terminate_ui_thread ) + { + y2debug( "Final sync with YCP thread" ); + signalYCPThread(); + y2debug( "Shutting down UI main loop" ); return; + } _builtinCallData.result = _builtinCallData.function->evaluateCall_int(); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org