diff --git a/src/service.c b/src/service.c index 129f305b..b64bdec7 100644 --- a/src/service.c +++ b/src/service.c @@ -371,6 +371,9 @@ static int service_start(svc_t *svc) } args[i] = NULL; + redirect(svc); + sig_unblock(); + /* * The setsid() call is the most humble of all in this * function. It takes care to detach the process from @@ -385,9 +388,6 @@ static int service_start(svc_t *svc) */ setsid(); - redirect(svc); - sig_unblock(); - if (svc_is_runtask(svc)) status = exec_runtask(svc->cmd, args); else