标签:perl守护进程
#!/usr/bin/perl
use strict;
use File::Slurp;
use Proc::Fork;
my $code=read_file(‘./dig.pl‘);
while(1){
run_fork{
child{
eval($code);
if($@){
ERROR $@;
}
exit;
}
parent{
my $child_pid=shift;
waitpid $child_pid,0;
}
};
sleep 10;
}
本文出自 “技术屌丝” 博客,谢绝转载!
标签:perl守护进程
原文地址:http://yeqing.blog.51cto.com/3159086/1679711