elsif($out && $opt_r){
#--- kill and restart
print "my_restart_handler: kill and restart...\n";
- system("ssh $PC \"pidof -x $opt_s | xargs kill -9; sleep 1; $opt_s $args & \" ");
+ system("ssh $PC \"pidof -x $opt_s | xargs kill -9; sleep 1; $opt_s $args >/dev/null 2>&1 & \" ");
}
#elsif($opt_r){
else {
#--- restart
print "my_restart_handler: restart...\n";
print "ssh $PC \"$opt_s $args & \" ";
- system("ssh $PC \"$opt_s $args & \" ");
+ system("ssh $PC \"$opt_s $args >/dev/null 2>&1 & \" ");
}
}
else{
#--- restart without killing
print "my_restart_handler: just start...\n";
- my $command = "ssh $PC \"$opt_s $args & \" ";
+ my $command = "ssh $PC \"$opt_s $args >/dev/null 2>&1 & \" ";
system($command);
}
}