From 23de10612c1b5fddf0a5d63fd5c424d1eeae8f36 Mon Sep 17 00:00:00 2001 From: Peter Bui Date: Wed, 1 Aug 2018 13:25:33 -0400 Subject: [PATCH] xautolock: add patch to fix silent failure on -restart command (#1325) If you run 'xautolock' instead of '/usr/bin/xautolock', execv will fail because it cannot found the path to the program when the -restart command is requested. Use execvp instead of execv, which will search the environmental PATH to find the program, thus allowing you to just run 'xautolock' rather than the full path. This fixes the bug where playing a video with mpv accidently kills your screenlocker since it calls xdg-screensaver reset, which in turn calls xautolock -restart. --- srcpkgs/xautolock/patches/fix-restart.patch | 11 +++++++++++ srcpkgs/xautolock/template | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/xautolock/patches/fix-restart.patch diff --git a/srcpkgs/xautolock/patches/fix-restart.patch b/srcpkgs/xautolock/patches/fix-restart.patch new file mode 100644 index 00000000000..372b38d7551 --- /dev/null +++ b/srcpkgs/xautolock/patches/fix-restart.patch @@ -0,0 +1,11 @@ +--- src/message.c 2018-07-31 01:20:05.740344556 -0400 ++++ src/message.c 2018-07-31 01:16:33.521671009 -0400 +@@ -104,7 +104,7 @@ + { + XDeleteProperty (d, root, semaphore); + XFlush (d); +- execv (argArray[0], argArray); ++ execvp(argArray[0], argArray); + } + } + diff --git a/srcpkgs/xautolock/template b/srcpkgs/xautolock/template index b59f3a8a4d8..673e57c9a78 100644 --- a/srcpkgs/xautolock/template +++ b/srcpkgs/xautolock/template @@ -1,7 +1,7 @@ # Template file for 'xautolock' pkgname=xautolock version=2.2 -revision=5 +revision=6 hostmakedepends="imake xorg-cf-files" makedepends="libXScrnSaver-devel xorgproto" short_desc="Autolock utility for X"