diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-24 18:12:24 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-24 18:12:24 +0200 |
commit | 4bde5b3cfc82348d822bcd99a0ca6bab022b2933 (patch) | |
tree | 18bc2b92b82ab9eaf4f7e62cd9d8b867ff7c8d47 /ftnoir_protocol_wine | |
parent | 25ac2117ec6b9f4b48e53c7d3dbc512d739830af (diff) |
improve wine wrapper subprocess handling
Signed-off-by: Stanislaw Halik <sthalik@misaki.pl>
Diffstat (limited to 'ftnoir_protocol_wine')
-rw-r--r-- | ftnoir_protocol_wine/ftnoir_protocol_wine.cpp | 9 |
1 files 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); } |