I'm writing a cgi script and wanting to fork to do some lengthy processing.
When I do a fork, the parent process is waiting for the child to finish because of
(I assume) open files from a module that is in the child subroutine (same
file). Rather than move the child to a different file and executing that file
to get past this, I would like to keep it all in one file. It's a small script.
My question is, how can I find and close all open file handles in the parent process?
Performing an exit doesn't seem to do the trick. The required modules are in
the child's branch of the fork and are
Spreadsheet::ParseExcel and Spreadsheet::WriteExcel if that helps.
Or am I way off of my reasoning of why the parent is waiting?
Thanks.