Merge branch 'namedscratchpads' into patched
This commit is contained in:
commit
ea8cb073ac
1 changed files with 8 additions and 0 deletions
8
dwm.c
8
dwm.c
|
@ -1816,10 +1816,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");
|
||||
|
|
Loading…
Reference in a new issue