From 7e05c2dadf69323a3890ff7aa9c9d2e3b099b48d Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Wed, 18 Jan 2012 23:27:40 +0100 Subject: [PATCH] Fix issue #8 on github about shell absolute path in spawn function, thanks to antoineB --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 67e8328..8e69fe2 100644 --- a/src/util.c +++ b/src/util.c @@ -105,7 +105,7 @@ spawn(const char *format, ...) return -1; } - if(!(sh = getenv("SHELL"))) + if(!(sh = getenv("SHELL")) || sh[0] != '/') sh = "/bin/sh"; if((pid = fork()) == 0)