1 diff --git fpicker/source/unx/kde_unx/UnxCommandThread.hxx fpicker/source/unx/kde_unx/UnxCommandThread.hxx
2 index d20321e..5fd62ee 100644
3 --- fpicker/source/unx/kde_unx/UnxCommandThread.hxx
4 +++ fpicker/source/unx/kde_unx/UnxCommandThread.hxx
6 #include <rtl/ustring.hxx>
9 +#include <vcl/svapp.hxx>
13 class UnxFilePickerNotifyThread;
15 +/** Synchronization for the 'thread-less' version of the fpicker.
17 + Something like osl::Condition, but calls Application::Yield() while in
20 +class YieldingCondition
22 + ::osl::Mutex m_aMutex;
27 + ::osl::MutexGuard aGuard( m_aMutex );
32 + YieldingCondition() { reset(); }
36 + ::osl::MutexGuard aGuard( m_aMutex );
42 + ::osl::MutexGuard aGuard( m_aMutex );
49 + Application::Yield();
53 class UnxFilePickerCommandThread : public ::osl::Thread
56 @@ -98,7 +138,7 @@ protected:
58 ::osl::Mutex m_aMutex;
60 - ::osl::Condition m_aExecCondition;
61 + YieldingCondition m_aExecCondition;
64 ::osl::Condition m_aGetCurrentFilterCondition;
65 @@ -117,7 +157,7 @@ public:
66 UnxFilePickerCommandThread( UnxFilePickerNotifyThread *pNotifyThread, int nReadFD );
67 ~UnxFilePickerCommandThread();
69 - ::osl::Condition& SAL_CALL execCondition() { return m_aExecCondition; }
70 + YieldingCondition& SAL_CALL execCondition() { return m_aExecCondition; }
71 sal_Bool SAL_CALL result();
73 ::osl::Condition& SAL_CALL getCurrentFilterCondition() { return m_aGetCurrentFilterCondition; }
74 diff --git fpicker/source/unx/kde_unx/UnxFilePicker.cxx fpicker/source/unx/kde_unx/UnxFilePicker.cxx
75 index 4590b74..16b2367 100644
76 --- fpicker/source/unx/kde_unx/UnxFilePicker.cxx
77 +++ fpicker/source/unx/kde_unx/UnxFilePicker.cxx
78 @@ -258,8 +258,12 @@ sal_Int16 SAL_CALL UnxFilePicker::execute()
82 - sendCommand( ::rtl::OUString::createFromAscii( "exec" ),
83 - m_pCommandThread->execCondition() );
84 + // this is _not_ an osl::Condition, see i#93366
85 + m_pCommandThread->execCondition().reset();
87 + sendCommand( ::rtl::OUString::createFromAscii( "exec" ) );
89 + m_pCommandThread->execCondition().wait();
91 return m_pCommandThread->result();