|Subject:||Errors from --clean packed application on HP-UX|
I’m running into a problem on HP-UX with –clean and shared libraries that are packed with pp. What happens is that my program runs as expected, but then I see a bunch of errors as the program exits of the form: Error removing /var/tmp/par-stanton/temp-5778/yknNbRMWLy.sl at /opt/perl_5.8.8/lib/5.8.8/File/Temp.pm line 890. It appears that on HP-UX (11.11) you cannot unlink a shared library that is currently in use by a process. This file is locked until it is no longer mapped by any process. It turns out the same thing happens on Windows, but there is special code in PAR::Heavy::_dl_extract() to turn off the UNLINK attribute on Windows. The attached patch resolves the error message issue by disabling UNLINK on hpux and Windows. It also ensures that the temporary directory is completely removed on hpux and Windows by adding a fallback case to the END block in par.pl that attempts to remove the directory by exec'ing a sh/cmd script. Because the exec releases library handles, the script is allowed to delete all of the files. I have tested this patch on HP-UX (11.11), Solaris, Linux, Windows, and MacOS X.
Message body not shown because it is not plain text.