Revision: 0a11a2607785
Author: Pekka Klärck
Date: Tue Aug 28 07:10:50 2012
Log: Fixed `Start Process` keyword on non-Windows platforms.
Update issue 1176
Status: Done
I tested that using `close_fds=True` on Windows, when we need to redirect
stdin and stdout, fails with the following error:
ValueError: close_fds is not supported on Windows platforms if you
redirect stdin/stdout/stderr
I ended up fixing this with `close_fds=os.sep=='/'`.
http://code.google.com/p/robotframework/source/detail?r=0a11a2607785
Modified:
/src/robot/libraries/OperatingSystem.py
=======================================
--- /src/robot/libraries/OperatingSystem.py Fri Jun 15 06:25:44 2012
+++ /src/robot/libraries/OperatingSystem.py Tue Aug 28 07:10:50 2012
@@ -1280,7 +1280,8 @@
def __init__(self, command, input_):
self._command = self._process_command(command)
p = subprocess.Popen(self._command, shell=True,
stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
+ stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
+ close_fds=os.sep=='/')
stdin, self.stdout = p.stdin, p.stdout
if input_:
stdin.write(input_)