jungchoi@c10r2s1 Pipex % ./pipex infile "cat" "grep hello" "grep h" "wc -l" outfile
[start] make pipe 'cat'
fd[0] : 3 fd[1] : 4
waitpid pid : 56463
parent start [cmd = 'cat']
[in_parent] pid : 56462 ppid : 50930
[end] make pipe 'cat'
[start] make pipe 'grep hello'
fd[0] : 3 fd[1] : 4
child start [cmd : 'cat']
waitpid pid : 56464
parent start [cmd = 'grep hello']
==================== [in_child] pid : 56463 ppid : 56462
[in_parent] pid : 56462 ppid : 50930
[in_child] execve 'cat'[end] make pipe 'grep hello'
[start] make pipe 'grep h'
fd[0] : 3 fd[1] : 4
child start [cmd : 'grep hello']
==================== [in_child] pid : 56464 ppid : 56462
[in_child] execve 'grep hello'waitpid pid : 56465
parent start [cmd = 'grep h']
[in_parent] pid : 56462 ppid : 50930
[end] make pipe 'grep h'
[start] make last pipe 'wc -l'
[in_parent last pipe] pid : 56462 ppid : 50930
child start [cmd : 'grep h']
==================== [in_child] pid : 56465 ppid : 56462
[in_child] execve 'grep h' 2