From 4bde5b3cfc82348d822bcd99a0ca6bab022b2933 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 24 Oct 2013 18:12:24 +0200 Subject: improve wine wrapper subprocess handling Signed-off-by: Stanislaw Halik --- ftnoir_protocol_wine/ftnoir_protocol_wine.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp index c5d0754f..d9c3f1e0 100644 --- a/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp +++ b/ftnoir_protocol_wine/ftnoir_protocol_wine.cpp @@ -19,9 +19,14 @@ FTNoIR_Protocol::~FTNoIR_Protocol() { if (shm) { shm->stop = true; - wrapper.waitForFinished(2000); + wrapper.waitForFinished(100); + } + wrapper.terminate(); + if (!wrapper.waitForFinished(100)) + { + wrapper.kill(); + wrapper.waitForFinished(42); } - wrapper.kill(); shm_unlink("/" WINE_SHM_NAME); } -- cgit v1.2.3