[Chapel Merge] Use pclose rather than fclose

Branch: refs/heads/main
Revision: e49ac36
Author: mppf
Link: Use pclose rather than fclose by mppf · Pull Request #18591 · chapel-lang/chapel · GitHub
Log Message:

Merge pull request #18591 from mppf/fix-gcc-11.2-error

Use pclose rather than fclose

To address an error pointed out by GCC 11.2 - the popen function is
documented to return something that needs to be closed with pclose rather
than fclose.

Reviewed by @jhh67 - thanks!