Note that exec will not call your END blocks, nor will it invoke DESTROY methods on your objects.
The subprocess does not call the code in the END block, so the temporary directories are never deleted. So I changed the conditions so that it's always the parent process that deletes the temporary directory.
In the subprocess,
exec()
in Perl are used.The subprocess does not call the code in the END block, so the temporary directories are never deleted. So I changed the conditions so that it's always the parent process that deletes the temporary directory.