summaryrefslogtreecommitdiffstats
path: root/Lib/test/subprocessdata/qcat.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-12-13 07:59:39 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-12-13 07:59:39 (GMT)
commit51ee270876f4e18ec579e57772e16fce146d805e (patch)
treeca518334c744fca3ed243def81dd72d4b9f0c8ba /Lib/test/subprocessdata/qcat.py
parentf5604853889bfbbf84b48311c63c0e775dff38cc (diff)
downloadcpython-51ee270876f4e18ec579e57772e16fce146d805e.zip
cpython-51ee270876f4e18ec579e57772e16fce146d805e.tar.gz
cpython-51ee270876f4e18ec579e57772e16fce146d805e.tar.bz2
issue7213: Open the pipes used by subprocesses with the FD_CLOEXEC flag from
the C code, using pipe2() when available. Adds unittests for close_fds and cloexec behaviors.
Diffstat (limited to 'Lib/test/subprocessdata/qcat.py')
-rw-r--r--Lib/test/subprocessdata/qcat.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/subprocessdata/qcat.py b/Lib/test/subprocessdata/qcat.py
new file mode 100644
index 0000000..fe6f9db
--- /dev/null
+++ b/Lib/test/subprocessdata/qcat.py
@@ -0,0 +1,7 @@
+"""When ran as a script, simulates cat with no arguments."""
+
+import sys
+
+if __name__ == "__main__":
+ for line in sys.stdin:
+ sys.stdout.write(line)