summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorTom Barrett <tom@tombarrett.xyz>2023-04-23 21:18:57 +0200
committerTom Barrett <tom@tombarrett.xyz>2023-04-23 21:18:57 +0200
commit77e17e732d2422996b93615b2697e2ee6d4bf252 (patch)
tree4ab6ea8043763fcdcf44cac0e861ccd1a1e0cc02 /dwm.c
parentc7a5d5d21919569d2c4b35756c59828a931c2982 (diff)
parente81f17d4c196aaed6893fd4beed49991caa3e2a4 (diff)
Merge git://git.suckless.org/dwm
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 4162d15..797660a 100644
--- a/dwm.c
+++ b/dwm.c
@@ -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]);
}