Trade-offs: By using this way, we can allow an arbitrary number of piped commands, instead of having a hard limit (like 8; I included a test case about max number of commands). It will be more efficient if we really want to do some complex pipelined executions. However, we need to update the memory allocation when reaching the initial limit. Moreover, we should be careful about memory leak. It's even more complex since we will have to deal with multiple child processes as well as the parent process, instead of a single one. Therefore, it will be harder to avoid some bugs like memory leak or double free.