| Guido van Rossum | 50692d6 | 1991-09-15 21:05:15 +0000 | [diff] [blame] | 1 | # Demonstrate that rsh exits when the remote end closes std{in,out,err}. |
| 2 | # rsh voorn exec /ufs/guido/bin/sgi/python /ufs/guido/mm/demo/audio/x.py | ||||
| 3 | |||||
| 4 | print 'hoi!' | ||||
| 5 | import sys | ||||
| 6 | sys.stdin.close() | ||||
| 7 | sys.stdout.close() | ||||
| 8 | sys.stderr.close() | ||||
| 9 | import time | ||||
| 10 | time.sleep(5) | ||||
| 11 | sys.stdout = open('@', 'w') | ||||
| 12 | sys.stdout.write('Hello\n') | ||||