From a1c5adece52386088986c5c62e41425595df7d6c Mon Sep 17 00:00:00 2001 From: Akos Horvath Date: Sat, 6 Apr 2024 15:35:09 +0200 Subject: [PATCH] log error if execvp fails in wm_kb_spawn --- src/wm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/wm.c b/src/wm.c index 0018261..822346a 100644 --- a/src/wm.c +++ b/src/wm.c @@ -596,7 +596,11 @@ void wm_kb_spawn(Wm *wm, Arg *args) if (wm->display) close(ConnectionNumber(wm->display)); setsid(); - execvp(args->sl[0], &(args->sl[1])); + + int ret = execvp(args->sl[0], &(args->sl[1])); + if (ret == -1) { + fprintf(stderr, "wm: could not run %s: %s\n", args->sl[0], strerror(errno)); + } exit(0); }