add a workaround to ensure that the filepush thread take notice of the
[enigma2.git] / lib / base / filepush.cpp
index 554c7845c1d830c3e63c778a02f6ec7bfbf3006c..8424ae4197fd219469d3702b2c7be4f68e60b89f 100644 (file)
@@ -176,7 +176,15 @@ void eFilePushThread::stop()
                return;
 
        m_stop = 1;
-       sendSignal(SIGUSR1);
+
+       // fixmee.. here we need a better solution to ensure
+       // that the thread context take notice of the signal
+       // even when no syscall is in progress
+       while(!sendSignal(SIGUSR1))
+       {
+               eDebug("send SIGUSR1 to thread context");
+               usleep(5000); // wait msek
+       }
        kill();
 }