Close input and output file handles.
authorP. J. McDermott <pjm@nac.net>
Sun, 22 Sep 2013 21:23:24 +0000 (17:23 -0400)
committerP. J. McDermott <pjm@nac.net>
Sun, 22 Sep 2013 21:23:24 +0000 (17:23 -0400)
src/ssic.pl

index 8ecc30e92104be274b2178284bcb3cb6bc9f9c45..5cc04efe502647737ace0cb520e4a5f0af852739 100644 (file)
@@ -152,6 +152,13 @@ sub compile
        }
 
        print($output_fh $ssi->process(<$input_fh>));
+
+       if ($input ne "-") {
+               close($input_fh);
+       }
+       if ($output ne "-") {
+               close($output_fh);
+       }
 }
 
 main();