mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 21:45:08 +00:00
Shell: Make the ENSURE_WAITID_ONCE requirements a bit less strict
waitid() *may* be called many times if a job does not exit, so only assert this fact when the job has in fact exited. Also allows Background nodes to contain non-execute nodes.
This commit is contained in:
parent
8de70e8ce7
commit
9ad858bcbf
2 changed files with 11 additions and 3 deletions
|
@ -228,10 +228,9 @@ RefPtr<AST::Node> Parser::parse_sequence()
|
|||
return first;
|
||||
}
|
||||
case '&': {
|
||||
auto execute_pipe_seq = first->would_execute() ? first.release_nonnull() : static_cast<NonnullRefPtr<AST::Node>>(create<AST::Execute>(first.release_nonnull()));
|
||||
consume();
|
||||
auto pos_after_seps = save_offset();
|
||||
auto bg = create<AST::Background>(execute_pipe_seq); // Execute Background
|
||||
auto bg = create<AST::Background>(first.release_nonnull()); // Execute Background
|
||||
if (auto rest = parse_sequence())
|
||||
return create<AST::Sequence>(
|
||||
move(bg),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue