--- tabbed.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tabbed.c b/tabbed.c index 9a44795..964c40d 100644 --- a/tabbed.c +++ b/tabbed.c _AT_@ -1080,16 +1080,21 @@ spawn(const Arg *arg) close(ConnectionNumber(dpy)); setsid(); - if (arg && arg->v) { + if (arg && arg->v && ((char **)arg->v)[0]) { execvp(((char **)arg->v)[0], (char **)arg->v); fprintf(stderr, "%s: execvp %s", argv0, ((char **)arg->v)[0]); - } else { + perror(" failed"); + } else if (cmd[0]) { cmd[cmd_append_pos] = NULL; execvp(cmd[0], cmd); fprintf(stderr, "%s: execvp %s", argv0, cmd[0]); + perror(" failed"); + } + else { + fprintf(stderr, "%s: Cannot spawn process, no command given\n", + argv0); } - perror(" failed"); exit(0); } } -- 2.9.2 --SkvwRMAIpAhPCcCJ--Received on Mon Sep 17 2001 - 00:00:00 CEST
This archive was generated by hypermail 2.3.0 : Sun Aug 14 2016 - 14:24:05 CEST