aboutsummarylogtreecommitdiffstats
path: root/util.c
diff options
context:
space:
mode:
authorAnselm R. Garbe2006-07-11 12:52:57 +0200
committerAnselm R. Garbe2006-07-11 12:52:57 +0200
commit30d3ad9e58e0b371a0dda361c76e8d15647282cb (patch)
treeb248f5321e538be193ecd27d114a0b47173ba40f /util.c
parent1ec4019e8a1a65538fc9969523960cc217abf9d8 (diff)
downloadaur-30d3ad9e58e0b371a0dda361c76e8d15647282cb.tar.gz
fixed several stuff (gridwm gets better and better)
Diffstat (limited to 'util.c')
-rw-r--r--util.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/util.c b/util.c
index de4df9857b52..c0f248961241 100644
--- a/util.c
+++ b/util.c
@@ -93,11 +93,12 @@ spawn(Display *dpy, const char *cmd)
return;
if(fork() == 0) {
if(fork() == 0) {
- setsid();
if(dpy)
close(ConnectionNumber(dpy));
- execlp(shell, "shell", "-c", cmd, NULL);
- fprintf(stderr, "gridwm: execvp %s", cmd);
+ setsid();
+ fprintf(stderr, "gridwm: execlp %s %s -c %s", shell, shell, cmd);
+ execlp(shell, shell, "-c", cmd, NULL);
+ fprintf(stderr, "gridwm: execlp %s", cmd);
perror(" failed");
}
exit (0);
@@ -123,14 +124,14 @@ pipe_spawn(char *buf, unsigned int len, Display *dpy, const char *cmd)
}
if(fork() == 0) {
- setsid();
if(dpy)
close(ConnectionNumber(dpy));
+ setsid();
dup2(pfd[1], STDOUT_FILENO);
close(pfd[0]);
close(pfd[1]);
- execlp(shell, "shell", "-c", cmd, NULL);
- fprintf(stderr, "gridwm: execvp %s", cmd);
+ execlp(shell, shell, "-c", cmd, NULL);
+ fprintf(stderr, "gridwm: execlp %s", cmd);
perror(" failed");
}
else {