我需要关于Perl的帮助,因为我对它还很陌生。我想从我的父Perl脚本中执行一个Perl脚本,并涵盖以下情况:
if (my child script takes more time than my time limit)
{
I need to kill the child script with a return code
logged into my parent script log file
}
if (my child script failed to execute)
{
I need to write a new RC to my parent script logfile
by looking at my child script exit status
}
请问有没有人能够提供代码,来说明如何使用fork、exec以及进程相关的命令,以获取子进程的进程ID,当父进程脚本被执行时?