$ ./6.fork.pl relevant processes with pstree command: 6.fork.pl,6839 -w ./6.fork.pl |-6.fork.pl,6840 -w ./6.fork.pl | `-sh,6842 -c ping www.google.com >5.fork.txt | `-ping,6843 www.google.com `-pstree,6841 -Apal 6839 6840 terminated PING www.google.com(sea30s02-in-x04.1e100.net (2607:f8b0:400a:803::2004)) 56 data bytes 64 bytes from sea30s02-in-x04.1e100.net (2607:f8b0:400a:803::2004): icmp_seq=1 ttl=54 time=33.4 ms 64 bytes from sea30s02-in-x04.1e100.net (2607:f8b0:400a:803::2004): icmp_seq=4 ttl=54 time=36.3 ms 64 bytes from sea15s07-in-x04.1e100.net (2607:f8b0:400a:800::2004): icmp_seq=460 ttl=54 time=123 ms 64 bytes from sea15s07-in-x04.1e100.net (2607:f8b0:400a:800::2004): icmp_seq=463 ttl=54 time=37.0 ms 64 bytes from sea15s07-in-x04.1e100.net (2607:f8b0:400a:800::2004): icmp_seq=466 ttl=54 time=18.1 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=605 ttl=54 time=44.4 ms 64 bytes from sea15s11-in-x04.1e100.net (2607:f8b0:400a:808::2004): icmp_seq=608 ttl=54 time=31.3 ms 10 ? <-ten seconds elapsed from forked process