Message99371
This is not quite correct:
The following 2 lines fail as expected (unbuffered):
<pre>
python -u -c 'import sys; print >> sys.stdout, "x"' 1>&- ; echo $?
python -u -c 'import sys; print >> sys.stderr, "x"' 2>&- ; echo $?
</pre>
whereas in the following example, the first command succeeds and the second one fails:
<pre>
python -c 'import sys; print >> sys.stdout, "x"' 1>&- ; echo $?
python -c 'import sys; print >> sys.stderr, "x"' 2>&- ; echo $?
</pre>
This is counter-intuitive and somewhat contradicts the documentation, as stderr always seems to be unbuffered (irrespective of the -u option). IMHO, they should either both fail or both succeed.
They seem to behave the same in 2.5 & 2.6, however in 3.1, they all die with a SIGABRT, which I guess could be questioned as well. IMHO, they should just throw an exception like in 2.6. |
|
Date |
User |
Action |
Args |
2010-02-15 21:03:45 | tholzer | set | recipients:
+ tholzer, loewis |
2010-02-15 21:03:45 | tholzer | set | messageid: <1266267825.51.0.71658913414.issue7932@psf.upfronthosting.co.za> |
2010-02-15 21:03:44 | tholzer | link | issue7932 messages |
2010-02-15 21:03:43 | tholzer | create | |
|