Merge branch 'namedscratchpads' into namedscratchpads-scratchtagwins

This commit is contained in:
GasparVardanyan 2024-09-01 22:28:09 +04:00
commit 7e5abcf827

8
dwm.c
View file

@ -1675,10 +1675,18 @@ spawn(const Arg *arg)
void spawnscratch(const Arg *arg)
{
struct sigaction sa;
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)[1], ((char **)arg->v)+1);
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[1]);
perror(" failed");