diff options
author | Tom Barrett <tom@tombarrett.xyz> | 2023-04-23 21:18:57 +0200 |
---|---|---|
committer | Tom Barrett <tom@tombarrett.xyz> | 2023-04-23 21:18:57 +0200 |
commit | 77e17e732d2422996b93615b2697e2ee6d4bf252 (patch) | |
tree | 4ab6ea8043763fcdcf44cac0e861ccd1a1e0cc02 | |
parent | c7a5d5d21919569d2c4b35756c59828a931c2982 (diff) | |
parent | e81f17d4c196aaed6893fd4beed49991caa3e2a4 (diff) |
Merge git://git.suckless.org/dwm
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | dwm.c | 8 |
2 files changed, 9 insertions, 1 deletions
@@ -26,7 +26,7 @@ INCS = -I${X11INC} -I${FREETYPEINC} LIBS = -L${X11LIB} -lX11 ${XINERAMALIBS} ${FREETYPELIBS} # flags -CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} +CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700L -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} #CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS} CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os ${INCS} ${CPPFLAGS} LDFLAGS = ${LIBS} @@ -1648,12 +1648,20 @@ showhide(Client *c) void spawn(const Arg *arg) { + struct sigaction sa; + if (arg->v == dmenucmd) dmenumon[0] = '0' + selmon->num; if (fork() == 0) { if (dpy) close(ConnectionNumber(dpy)); setsid(); + + sigemptyset(&sa.sa_mask); + sa.sa_flags = 0; + sa.sa_handler = SIG_DFL; + sigaction(SIGCHLD, &sa, NULL); + execvp(((char **)arg->v)[0], (char **)arg->v); die("dwm: execvp '%s' failed:", ((char **)arg->v)[0]); } |