diff options
author | Robert Tari <robert@tari.in> | 2023-11-06 14:55:06 +0100 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2023-11-06 14:55:06 +0100 |
commit | 19eb6b5cef6ac9058c10ae7f8aa61437e0ac5d3f (patch) | |
tree | 3e42455b4087e9501716f0f8eee74f097e63bf0d | |
parent | 4d926cf9a7087df1ef6d40743d17063ebcd4e392 (diff) | |
download | arctica-greeter-19eb6b5cef6ac9058c10ae7f8aa61437e0ac5d3f.tar.gz arctica-greeter-19eb6b5cef6ac9058c10ae7f8aa61437e0ac5d3f.tar.bz2 arctica-greeter-19eb6b5cef6ac9058c10ae7f8aa61437e0ac5d3f.zip |
src/arctica-greeter.vala: Fix killing Orca
-rw-r--r-- | src/arctica-greeter.vala | 14 |
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); } } |