summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-04-26 07:52:51 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-04-26 07:52:51 +0000
commitd175a3f045fc637f1a2ebcb20d3386cf109302c4 (patch)
tree8a57620144a60dea903e8e7e7cd49df83bfd2711 /pp_ctl.c
parent0dd88869d3c6272dc66f202c5be0f40bfb94fccd (diff)
downloadperl-d175a3f045fc637f1a2ebcb20d3386cf109302c4.tar.gz
integrate change#3229 from maint-5.004
p4raw-link: @3229 on //depot/maint-5.004/perl: 3e0793ddbcfdff90910112e638ae702c43386bb6 p4raw-id: //depot/perl@3271
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index e29ff19997..7ac600b3f0 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1393,8 +1393,17 @@ die_where(char *message)
}
if (!message)
message = SvPVx(ERRSV, n_a);
- PerlIO_printf(PerlIO_stderr(), "%s",message);
- PerlIO_flush(PerlIO_stderr());
+ {
+#ifdef USE_SFIO
+ /* SFIO can really mess with your errno */
+ int e = errno;
+#endif
+ PerlIO_puts(PerlIO_stderr(), message);
+ (void)PerlIO_flush(PerlIO_stderr());
+#ifdef USE_SFIO
+ errno = e;
+#endif
+ }
my_failure_exit();
/* NOTREACHED */
return 0;