summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorSteve Grazzini <grazz@pobox.com>2003-06-18 15:42:37 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2003-06-19 14:08:13 +0000
commit7ff032551aa263179d4cb6df3dd91502d713e6ba (patch)
tree7dd25bf874fe4d2842d7e56fa2b9da375cf60df3 /pp_ctl.c
parentca9279baf07d6843f58a31f1ce3ff7dc875faf1a (diff)
downloadperl-7ff032551aa263179d4cb6df3dd91502d713e6ba.tar.gz
Re: [perl #17934] tied STDERR and internal warnings
Message-ID: <20030618234237.GA6267@grazzini.net> p4raw-id: //depot/perl@19819
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 42fea5904e..30e7b1356a 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1329,8 +1329,6 @@ OP *
Perl_die_where(pTHX_ char *message, STRLEN msglen)
{
STRLEN n_a;
- IO *io;
- MAGIC *mg;
if (PL_in_eval) {
I32 cxix;
@@ -1412,30 +1410,7 @@ Perl_die_where(pTHX_ char *message, STRLEN msglen)
if (!message)
message = SvPVx(ERRSV, msglen);
- /* if STDERR is tied, print to it instead */
- if (PL_stderrgv && (io = GvIOp(PL_stderrgv))
- && (mg = SvTIED_mg((SV*)io, PERL_MAGIC_tiedscalar))) {
- dSP; ENTER;
- PUSHMARK(SP);
- XPUSHs(SvTIED_obj((SV*)io, mg));
- XPUSHs(sv_2mortal(newSVpvn(message, msglen)));
- PUTBACK;
- call_method("PRINT", G_SCALAR);
- LEAVE;
- }
- else {
-#ifdef USE_SFIO
- /* SFIO can really mess with your errno */
- int e = errno;
-#endif
- PerlIO *serr = Perl_error_log;
-
- PERL_WRITE_MSG_TO_CONSOLE(serr, message, msglen);
- (void)PerlIO_flush(serr);
-#ifdef USE_SFIO
- errno = e;
-#endif
- }
+ write_to_stderr(message, msglen);
my_failure_exit();
/* NOTREACHED */
return 0;