Merge branch 'namedscratchpads' into namedscratchpads-scratchtagwins
This commit is contained in:
commit
7e5abcf827
1 changed files with 8 additions and 0 deletions
8
dwm.c
8
dwm.c
|
@ -1675,10 +1675,18 @@ spawn(const Arg *arg)
|
||||||
|
|
||||||
void spawnscratch(const Arg *arg)
|
void spawnscratch(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
struct sigaction sa;
|
||||||
|
|
||||||
if (fork() == 0) {
|
if (fork() == 0) {
|
||||||
if (dpy)
|
if (dpy)
|
||||||
close(ConnectionNumber(dpy));
|
close(ConnectionNumber(dpy));
|
||||||
setsid();
|
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);
|
execvp(((char **)arg->v)[1], ((char **)arg->v)+1);
|
||||||
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[1]);
|
fprintf(stderr, "dwm: execvp %s", ((char **)arg->v)[1]);
|
||||||
perror(" failed");
|
perror(" failed");
|
||||||
|
|
Loading…
Reference in a new issue