More robust creation of a subprocess, attempt to solve bug #13546.