$ ./6.fork.pl relevant processes with pstree command: 6.fork.pl,6780 -w ./6.fork.pl |-6.fork.pl,6781 -w ./6.fork.pl | `-sh,6783 -c ping www.google.com >5.fork.txt `-pstree,6782 -Apal 6780 6781 terminated PING www.google.com(sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004)) 56 data bytes 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=1 ttl=54 time=30.6 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=3 ttl=54 time=147 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=4 ttl=54 time=16.3 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=5 ttl=54 time=137 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=6 ttl=54 time=123 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=7 ttl=54 time=20.5 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=8 ttl=54 time=20.7 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=9 ttl=54 time=20.3 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=10 ttl=54 time=24.2 ms 10 seconds elapsed instead of a year