diff options
Diffstat (limited to 'service.c')
-rw-r--r-- | service.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/service.c b/service.c index 4ea9126..38049ff 100644 --- a/service.c +++ b/service.c @@ -246,7 +246,9 @@ void serviceStart(struct Service *service) { if (len >= sizeof(command)) errx(ExitNoExec, "command truncated"); } int n = snprintf( - &command[len], sizeof(command) - len, "exec %s", service->command + &command[len], sizeof(command) - len, "%s%s", + (service->command[strcspn(service->command, ";&|()")] ? "exec " : ""), + service->command ); assert(n > 0); len += n; |