summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Roovers <jer@gentoo.org>2019-01-15 11:34:18 +0100
committerJeroen Roovers <jer@gentoo.org>2019-01-15 11:34:57 +0100
commit075f311d7e8913f0a27f2247faac675ebb94d137 (patch)
treeb3141750811b0b297fde334e6a56ba96595a8e23 /x11-misc/xautolock/files
parentdev-lang/spidermonkey: Stable for HPPA too. (diff)
downloadgentoo-075f311d7e8913f0a27f2247faac675ebb94d137.tar.gz
gentoo-075f311d7e8913f0a27f2247faac675ebb94d137.tar.bz2
gentoo-075f311d7e8913f0a27f2247faac675ebb94d137.zip
x11-misc/xautolock: Use waitpid() instead of wait3()
Fixes: https://bugs.gentoo.org/675242 Package-Manager: Portage-2.3.55, Repoman-2.3.12 Signed-off-by: Jeroen Roovers <jer@gentoo.org>
Diffstat (limited to 'x11-misc/xautolock/files')
-rw-r--r--x11-misc/xautolock/files/xautolock-2.2_p5_p1-waitpid.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/x11-misc/xautolock/files/xautolock-2.2_p5_p1-waitpid.patch b/x11-misc/xautolock/files/xautolock-2.2_p5_p1-waitpid.patch
new file mode 100644
index 000000000000..98d96b2e2d34
--- /dev/null
+++ b/x11-misc/xautolock/files/xautolock-2.2_p5_p1-waitpid.patch
@@ -0,0 +1,25 @@
+--- a/src/engine.c
++++ b/src/engine.c
+@@ -210,22 +210,14 @@ evaluateTriggers (Display* d)
+ #else /* VMS */
+ if (lockerPid)
+ {
+-#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4)
+- union wait status; /* childs process status */
+-#else /* !UTEKV && !SYSV && !SVR4 */
+ int status = 0; /* childs process status */
+-#endif /* !UTEKV && !SYSV && !SVR4 */
+
+ if (unlockNow && !disabled)
+ {
+ (void) kill (lockerPid, SIGTERM);
+ }
+
+-#if !defined (UTEKV) && !defined (SYSV) && !defined (SVR4)
+- if (wait3 (&status, WNOHANG, 0))
+-#else /* !UTEKV && !SYSV && !SVR4 */
+ if (waitpid (-1, &status, WNOHANG))
+-#endif /* !UTEKV && !SYSV && !SVR4 */
+ {
+ /*
+ * If the locker exited normally, we disable any pending kill