From aabc0182ebb05fef47d88e6d3d9d84f4cdc3d6c3 Mon Sep 17 00:00:00 2001 From: Alexey Shilov Date: Wed, 13 Apr 2011 16:27:44 +0300 Subject: [PATCH] Fixes: NB#246767 - Invoker is killed when used to maximize already running single-instance application RevBy: Jussi Lind --- debian/changelog | 1 + src/launcherlib/booster.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3064a97..626b0bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ applauncherd (0.27.0) unstable; urgency=low * Fixes: NB#244103 - Device hangs on closing application in connecting view while configuring MFE account * Fixes: NB#243857 - Mismatched new[] - delete in applauncherd * Fixes: NB#238937 - minor splash-screen bugs + * Fixes: NB#246767 - Invoker is killed when used to maximize already running single-instance application -- Olli Leppanen Fri, 08 Apr 2011 15:08:24 +0300 diff --git a/src/launcherlib/booster.cpp b/src/launcherlib/booster.cpp index 7db3c3e..17ca9be 100644 --- a/src/launcherlib/booster.cpp +++ b/src/launcherlib/booster.cpp @@ -128,6 +128,11 @@ void Booster::initialize(int initialArgc, char ** initialArgv, int newBoosterLau Logger::logErrorAndDie(EXIT_FAILURE, "Booster: Couldn't read command\n"); } + // Send parent process a message that it can create a new booster, + // send pid of invoker, booster respawn value and invoker socket connection. + // Must be called before possible exit during single instatance check. + sendDataToParent(); + // Run process as single instance if requested if (m_appData->singleInstance()) { @@ -160,10 +165,6 @@ void Booster::initialize(int initialArgc, char ** initialArgv, int newBoosterLau // has been read from invoker in receiveDataFromInvoker(). renameProcess(initialArgc, initialArgv, m_appData->argc(), m_appData->argv()); - // Send parent process a message that it can create a new booster, - // send pid of invoker, booster respawn value and invoker socket connection - sendDataToParent(); - close(boosterLauncherSocket()); // close invoker socket connection