Bug 264219 - Run CliInterface from the main thread
Summary: Run CliInterface from the main thread
Status: RESOLVED MOVED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-25 04:35 UTC by Raphael Kubo da Costa
Modified: 2016-03-06 20:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raphael Kubo da Costa 2011-01-25 04:35:59 UTC
Version:           unspecified (using Devel) 
OS:                FreeBSD

We already use a QProcess in CliInterface, so there should be no reason for also running it from a separate thread.

Besides all the hell associated to running threaded code, it is unnecessary and causes problems with main loops such as the one in CliInterface::runProcess() -- if CliInterface::failOperation() is called (when a wrong password is entered in a header-protected file), KJob::emitResult() will end up being called somewhere in the call stack, and will terminate the auxiliary thread running our QProcess, finishing the event loop before the process is terminated correctly.

Reproducible: Always
Comment 1 Elvis Angelaccio 2016-03-06 20:01:40 UTC
I'm moving this one on phabricator, since it's a more adequate place for development tasks :)

Link: https://phabricator.kde.org/T1771