Working on pipe ‘|’ and wait() for Linux shells 🍽️

Today I am trying to finish up my Linux shell. I am looking through the functions I wrote to determine where I need to use the wait() or waitpid() command. As I understand it, if a function is using a pipe ‘|’ then the parent process which is reading from the pipe should be told to wait for its child process which is feeding into the pipe. That makes sense. If you’re a waiter, you need to wait for the food to be put on a plate before you go and try to bring it to a patron. 🍽️

Leave a Reply

Your email address will not be published. Required fields are marked *