git-svn-id: https://svn.osgeo.org/grass/grass/trunk@40169 15284696-431f-4ddb-bdfa-cd5b030d7da7
@@ -569,10 +569,10 @@ def RunCommand(prog, flags = "", overwrite = False, quiet = False, verbose = Fal
ps.stdin.write(stdin)
ps.stdin.close()
ps.stdin = None
-
- ret = ps.wait()
stdout, stderr = ps.communicate()
+
+ ret = ps.returncode
if ret != 0 and parent:
e = CmdError(cmd = prog,