summaryrefslogtreecommitdiffabout
path: root/src
authorSergey Poznyakoff <gray@gnu.org>2019-05-28 12:33:12 (GMT)
committer Sergey Poznyakoff <gray@gnu.org>2019-05-28 12:33:12 (GMT)
commitca38eef07ac3f9a4825f0046c1d373ed7b2f074b (patch) (side-by-side diff)
tree1e14684b9eff679dfd5f1cdc1a9ac6da3f470913 /src
parentf8a25debf6e6422f291c69c5cb5d7732c78a4250 (diff)
downloadpies-ca38eef07ac3f9a4825f0046c1d373ed7b2f074b.tar.gz
pies-ca38eef07ac3f9a4825f0046c1d373ed7b2f074b.tar.bz2
Permit stdout redirection for startup and shutdown components.
* src/progman.c (register_prog0): Preserve comp->redir[RETR_OUT].type for exec, startup, and shutdown components.
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/progman.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/progman.c b/src/progman.c
index bae82ba..85670f2 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -294,9 +294,17 @@ register_prog0 (struct component *comp)
else
newp->active = 1;
- if (comp->mode != pies_comp_exec)
- comp->redir[RETR_OUT].type = redir_null;
-
+ switch (comp->mode)
+ {
+ case pies_comp_exec:
+ case pies_comp_startup:
+ case pies_comp_shutdown:
+ break;
+
+ default:
+ comp->redir[RETR_OUT].type = redir_null;
+ }
+
link_prog (newp, find_prog_ref (comp));
component_ref_incr (comp);
return newp;

Return to:

Send suggestions and report system problems to the System administrator.