summaryrefslogtreecommitdiff
path: root/src/spawn.h
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-10-24 07:11:08 -0400
committerisanae <14251494+isanae@users.noreply.github.com>2019-11-06 07:44:54 -0500
commitbff5a22f48b933fe9eba3a15497882ddf2a03990 (patch)
treeec79ff1472107be952b12a8b15dda6350d0fb9a8 /src/spawn.h
parent8f24f6298f62e36db1c7a624052e70b41c5e7e27 (diff)
spawning an executable now only waits for that particular process
added waitForAllUSVFSProcesses() to OrganizerCore, used when closing MO
Diffstat (limited to 'src/spawn.h')
-rw-r--r--src/spawn.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/spawn.h b/src/spawn.h
index 866e1795..441cad2c 100644
--- a/src/spawn.h
+++ b/src/spawn.h
@@ -27,6 +27,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include <QDir>
class Settings;
+class ILockedWaitingForProcess;
+
namespace MOBase { class IPluginGame; }
namespace spawn
@@ -84,6 +86,7 @@ public:
~SpawnedProcess();
HANDLE releaseHandle();
+ void wait();
private:
HANDLE m_handle;
@@ -122,6 +125,17 @@ QString findJavaInstallation(const QString& jarFile);
FileExecutionContext getFileExecutionContext(
QWidget* parent, const QFileInfo& target);
+
+enum class WaitResults
+{
+ Completed = 1,
+ Error,
+ Unlocked
+};
+
+WaitResults waitForProcess(
+ HANDLE handle, DWORD* exitCode, ILockedWaitingForProcess* uilock);
+
} // namespace