fix deadlock when using stdout=PIPE and/or stderr=PIPE and the child process generates enough output to a pipe
fix deadlock when using stdout=PIPE and/or stderr=PIPE and the child process generates enough output to a pipe

iamshital/azure-linux-automation,Nidylei/azure-linux-automation,konkasoftci/azure-linux-automation,FreeBSDonHyper-V/azure-freebsd-automation,hglkrijger/azure-linux-automation,hglkrijger/azure-linux-automation,iamshital/azure-linux-automation,Nidylei/azure-linux-automation,konkasoftci/azure-linux-automation,v-sirebb/azure-linux-automation,FreeBSDonHyper-V/azure-freebsd-automation,konkasoftci/azure-linux-automation,FreeBSDonHyper-V/azure-freebsd-automation,hglkrijger/azure-linux-automation,v-sirebb/azure-linux-automation,Nidylei/azure-linux-automation,v-sirebb/azure-linux-automation,iamshital/azure-linux-automation