sub functionname { # system("sh processkill $childpid"); print"time out entered into sigalrmhandler";###############TEMP LINE-----------> PS if($cmd =~ /aaa/){ $tmpkill =""; # code here syscall(&SYS_close, fileno(CMD)); } 1;