Fix ordering of mixed stdout / stderr printing

This commit is contained in:
Anthony Sottile 2019-10-12 13:35:04 -07:00
parent 183c8cbb3a
commit 2633d38a63
6 changed files with 55 additions and 32 deletions

View file

@ -0,0 +1,4 @@
- id: stdout-stderr
name: stdout-stderr
language: script
entry: ./entry

View file

@ -0,0 +1,13 @@
#!/usr/bin/env python
import sys
def main():
for i in range(6):
f = sys.stdout if i % 2 == 0 else sys.stderr
f.write('{}\n'.format(i))
f.flush()
if __name__ == '__main__':
exit(main())