【发布时间】:2011-08-01 15:35:34
【问题描述】:
我需要关于 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?
【问题讨论】:
-
只有父母才能杀死孩子。 :D