aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-06 15:43:01 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-11-06 15:43:01 +0100
commitd48b9b3be8b3fa225318d74aee58759f99111088 (patch)
tree3e42455b4087e9501716f0f8eee74f097e63bf0d
parent4d926cf9a7087df1ef6d40743d17063ebcd4e392 (diff)
parent19eb6b5cef6ac9058c10ae7f8aa61437e0ac5d3f (diff)
downloadarctica-greeter-d48b9b3be8b3fa225318d74aee58759f99111088.tar.gz
arctica-greeter-d48b9b3be8b3fa225318d74aee58759f99111088.tar.bz2
arctica-greeter-d48b9b3be8b3fa225318d74aee58759f99111088.zip
Merge branch 'tari01-pr/kill-orca'
Attributes GH PR #94: https://github.com/ArcticaProject/arctica-greeter/pull/94
-rw-r--r--src/arctica-greeter.vala14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 0bb4c8d..06a4854 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -1383,7 +1383,7 @@ public class DBusServer : Object
private Gtk.Socket pSocket = null;
private bool high_contrast_osk = AGSettings.get_boolean(AGSettings.KEY_HIGH_CONTRAST);
- private void closePid (ref Pid nPid)
+ private void closePid (ref Pid nPid, int nMultiplier)
{
if (nPid > 0)
{
@@ -1395,17 +1395,17 @@ public class DBusServer : Object
* Otherwise a follow-up onboard process (group) will refuse to start
* immediately after having killed the previous process (group).
*/
- Posix.kill (-nPid, Posix.Signal.TERM);
+ Posix.kill (nPid * nMultiplier, Posix.Signal.TERM);
int nStatus;
- Posix.waitpid (-nPid, out nStatus, 0);
+ Posix.waitpid (nPid * nMultiplier, out nStatus, 0);
nPid = 0;
}
}
private void cleanup ()
{
- closePid (ref nOnBoard);
- closePid (ref nOrca);
+ closePid (ref nOnBoard, -1);
+ closePid (ref nOrca, 1);
}
public DBusServer (DBusConnection pConnection, ArcticaGreeter pGreeter)
@@ -1477,7 +1477,7 @@ public class DBusServer : Object
/* calling closePid sets nOnBoard to 0 */
debug ("Closing previous keyboard with PID %d", nOnBoard);
- closePid (ref nOnBoard);
+ closePid (ref nOnBoard, -1);
/* Sending SIGTERM to the plug (i.e. the onboard process group)
* will destroy pSocket, so NULLing it now.
@@ -1642,7 +1642,7 @@ public class DBusServer : Object
}
else
{
- closePid (ref nOrca);
+ closePid (ref nOrca, 1);
}
}