mirror of
https://github.com/troglobit/finit.git
synced 2026-10-27 12:20:54 +00:00
Allow pipe + redirect in task/run stanzas, exec() in /bin/sh
This patch extends the capabilities of task and run .conf stanzas by
enabling pipes and redirects.
Example:
task [s] echo "foo" | cat >/tmp/bar
run [s] echo "$HOME" >/tmp/secret
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
442598282f
commit
684314db0f
4 files changed
+26
-1
No files matched your search
+3
-1
@@ -270,8 +270,10 @@ static int service_start(svc_t *svc)
|
||||
|
||||
if (svc->inetd.cmd)
|
||||
status = svc->inetd.cmd(svc->inetd.type);
|
||||
else if (svc->type & SVC_TYPE_RUNTASK)
|
||||
status = exec_runtask(svc->cmd, args);
|
||||
else
|
||||
status = execv(svc->cmd, args); /* XXX: Maybe use execve() to be able to launch scripts? */
|
||||
status = execv(svc->cmd, args);
|
||||
|
||||
#ifdef INETD_ENABLED
|
||||
if (svc_is_inetd_conn(svc)) {
|
||||
|
||||
Reference in new issue
Block a user