#parent process while (! waitpid($pid, WNOHANG)) { my $status = system("ps aux | grep \[tv\]time"); if (! $status) { system("tvtime-command DISPLAY_MESSAGE \'Wait several minutes while EPG updates...\'"); sleep 1; } }