Closes #23234: Refactor subprocess

Use new OSError exceptions, factorize stdin.write() code.
1 file changed