Implement pipe duping
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 1 Aug 2024 12:34:30 +0000 (14:34 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 1 Aug 2024 12:34:30 +0000 (14:34 +0200)
commit54e8ceb5db7c923d4e57bf2b6038b75f7e76137a
treed5ae88ccc4138d0089be484552321720edd2789a
parentb27ba79079e738c67acb19e7190810c643e49491
Implement pipe duping

The order of closing the ends of pipes in ex_pipeline is done because
the reading end does not receive the eof unless the writting end is
closed. That means all file descriptors pointing to the writting end
have to be closed.
If the minishell itself only closes it after execution of the second
part of a pipe, it gets deadlocked, because minishell waits for the
process end to close the pipe and the process waits for the pipe to be
closed to exit.
src/execution.c