Fix logic in managing EAGAIN on sending signal in client (prepare_app2) 17/319217/3
authorTomasz Swierczek <t.swierczek@samsung.com>
Thu, 17 Oct 2024 14:19:37 +0000 (16:19 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 23 Oct 2024 19:24:55 +0000 (19:24 +0000)
Previous buggy version could lead to abort in case
2nd attempt at sending a signal went okay.

Change-Id: Ia0b0001f4ed602f9f7e5d40922998b5912a2414a

src/client/client-security-manager.cpp

index 16a6ddbae728f0027302c6221612e3048c9d02ec..7197f7232c20b045d14ed6ff6295df8b4ff16ac6 100644 (file)
@@ -692,8 +692,7 @@ static inline int security_manager_sync_threads_internal(const std::string &app_
                                 abort();
                             }
                         }
-                    }
-                    if (ESRCH == err) { // thread already gone - noop
+                    } else if (ESRCH == err) { // thread already gone - noop
                         continue;
                     } else {
                         LogWithErrno(err, "tgkill()");