diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2009-06-14 12:53:22 -0400 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-06-14 19:02:15 -0500 |
commit | c6757210fa44035178e0a2501e1022995a42b70d (patch) | |
tree | d4b7449976d9238af4f1b6ab2619a03ba96e5800 /mpeix/mpeix.c | |
parent | 423174046424f87a68e7227cd8015f1926fede2d (diff) | |
download | perl-c6757210fa44035178e0a2501e1022995a42b70d.tar.gz |
The attached patch to perlio.c fixes the problem of errno getting set.
While I am firmly in the school of "do not look at $! except immediately
after a failure", I also agree that spuriously setting it is messy. But
there is just no way of knowing where your errno might have been.
The problem was that PerlIO_fast_gets() (and other nearby similar
capability-checking PerlIO routines) set the errno (and it was being
called a lot, from sv_gets()). I think setting the errno here was
a mistake: checking for "can has FOO" should not set external state,
such as the errno. The patch removes that errno trashing from all those
routines.
Diffstat (limited to 'mpeix/mpeix.c')
0 files changed, 0 insertions, 0 deletions