|
@@ -716,11 +716,19 @@ static bool_t exec_action_sequence(const kexec_t *exec, kcontext_t *context,
|
|
|
// Is it end of ACTION sequence?
|
|
// Is it end of ACTION sequence?
|
|
|
if (!iter) {
|
|
if (!iter) {
|
|
|
kcontext_set_done(context, BOOL_TRUE);
|
|
kcontext_set_done(context, BOOL_TRUE);
|
|
|
|
|
+
|
|
|
// Close the stdout of finished ACTION sequence to inform
|
|
// Close the stdout of finished ACTION sequence to inform
|
|
|
// process next in pipe about EOF. Else filter will not
|
|
// process next in pipe about EOF. Else filter will not
|
|
|
// stop at all.
|
|
// stop at all.
|
|
|
close(kcontext_stdout(context));
|
|
close(kcontext_stdout(context));
|
|
|
kcontext_set_stdout(context, -1);
|
|
kcontext_set_stdout(context, -1);
|
|
|
|
|
+
|
|
|
|
|
+ // Close the stdin of finished ACTION sequence to inform
|
|
|
|
|
+ // process previous in pipe. Else previous command will
|
|
|
|
|
+ // try to write to the pipe continously.
|
|
|
|
|
+ close(kcontext_stdin(context));
|
|
|
|
|
+ kcontext_set_stdin(context, -1);
|
|
|
|
|
+
|
|
|
return BOOL_TRUE;
|
|
return BOOL_TRUE;
|
|
|
}
|
|
}
|
|
|
|
|
|