Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: third_party/twisted_8_1/twisted/test/process_fds.py

Issue 12261012: Remove third_party/twisted_8_1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1
2 """Write to a handful of file descriptors, to test the childFDs= argument of
3 reactor.spawnProcess()
4 """
5
6 import os, sys
7
8 debug = 0
9
10 if debug: stderr = os.fdopen(2, "w")
11
12 if debug: print >>stderr, "this is stderr"
13
14 abcd = os.read(0, 4)
15 if debug: print >>stderr, "read(0):", abcd
16 if abcd != "abcd":
17 sys.exit(1)
18
19 if debug: print >>stderr, "os.write(1, righto)"
20
21 os.write(1, "righto")
22
23 efgh = os.read(3, 4)
24 if debug: print >>stderr, "read(3):", efgh
25 if efgh != "efgh":
26 sys.exit(2)
27
28 if debug: print >>stderr, "os.close(4)"
29 os.close(4)
30
31 eof = os.read(5, 4)
32 if debug: print >>stderr, "read(5):", eof
33 if eof != "":
34 sys.exit(3)
35
36 if debug: print >>stderr, "os.write(1, closed)"
37 os.write(1, "closed")
38
39 if debug: print >>stderr, "sys.exit(0)"
40 sys.exit(0)
OLDNEW
« no previous file with comments | « third_party/twisted_8_1/twisted/test/process_echoer.py ('k') | third_party/twisted_8_1/twisted/test/process_linger.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698