FORK: { if ($pid=fork) { ## parent process,no operation is performed here next; } elsif (defined $pid) { ## Starting Fork, transfering data &download_a_file(); exit 0; } } until (waitpid ($pid,0) ) { ## I need to perform some action only when child process is running &calculate_network_bandwidth(); }