Commit 17d9ae2b authored by Gavin Brown's avatar Gavin Brown

close handles

parent a180c5a1
......@@ -72,16 +72,19 @@ printf(CHLD_IN "cd %s\n", $config->{'cp.directory'});
foreach my $file (@files) {
printf(CHLD_IN "put %s\n", $file);
}
close(CHLD_IN);
while (my $out = <CHLD_OUT>) {
chomp($out);
syslog(LOG_DEBUG, $out);
}
close(CHLD_OUT);
while (my $out = <CHLD_ERR>) {
chomp($out);
syslog(LOG_CRIT, $out);
}
close(CHLD_ERR);
waitpid($pid, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment