1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:17:35 +00:00

Shell: Moves pipelined processes to one process group

This commit is contained in:
AnotherTest 2020-08-11 15:54:46 +04:30 committed by Andreas Kling
parent 8a17527bc5
commit ab3e787334
6 changed files with 44 additions and 11 deletions

View file

@ -150,9 +150,15 @@ private:
virtual bool is_fd_redirection() const override { return true; }
};
class Pipeline : public RefCounted<Pipeline> {
public:
pid_t pgid { -1 };
};
struct Command {
Vector<String> argv;
NonnullRefPtrVector<Redirection> redirections;
mutable RefPtr<Pipeline> pipeline;
bool should_wait { true };
bool is_pipe_source { false };
bool should_notify_if_in_background { true };
@ -190,7 +196,7 @@ public:
}
CommandValue(Vector<String> argv)
: m_command({ move(argv), {}, true, false, true })
: m_command({ move(argv), {}, {}, true, false, true })
{
}