pledge x11/xcape
add a simple patch to pledge("stdio") xcape. Tested also by Thim Cederlund, thanks!
This commit is contained in:
parent
e99aee537c
commit
956010c76a
|
@ -3,12 +3,14 @@ COMMENT = configure a modifier key when pressed and released by itself
|
|||
GH_ACCOUNT = alols
|
||||
GH_PROJECT = xcape
|
||||
GH_TAGNAME = v1.2
|
||||
REVISION = 0
|
||||
|
||||
CATEGORIES = x11
|
||||
|
||||
# GPLv3+
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
# uses pledge()
|
||||
WANTLIB += X11 Xtst c pthread
|
||||
|
||||
MAKE_FLAGS = PREFIX=${PREFIX} \
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
pledge it
|
||||
|
||||
Index: xcape.c
|
||||
--- xcape.c.orig
|
||||
+++ xcape.c
|
||||
@@ -191,6 +191,12 @@ int main (int argc, char **argv)
|
||||
if (self->debug != True)
|
||||
daemon (0, 0);
|
||||
|
||||
+ if (pledge ("stdio", NULL) == -1)
|
||||
+ {
|
||||
+ fprintf (stderr, "pledge: %s\n", strerror(errno));
|
||||
+ exit (EXIT_FAILURE);
|
||||
+ }
|
||||
+
|
||||
sigemptyset (&self->sigset);
|
||||
sigaddset (&self->sigset, SIGINT);
|
||||
sigaddset (&self->sigset, SIGTERM);
|
Loading…
Reference in New Issue