PerfMonComps: Re-open the closed pmon stream if needed...
This should fix the perfmon crash that's reported in ATR-24431. After !51221 (merged), the mother process closes the pmon stream before forking the children in the MP mode. The problem was that we never reset the closed fd, causing undefined behavior (sometimes crashes). Here, we fix this and re-open the stream before writing into it if needed.
This fixes the crash in test_trigP1_v1Cosmic_T0Mon_build.py.
Edited by Alaettin Serhan Mete