我需要有关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?
最佳答案
perlipc(进程间通信)手册页将是一个不错的起点。
关于perl - 想要在Perl脚本中执行Perl脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6900816/