Skip to content

print on closed filehandle Sys::Syslog::CONS #1257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
p5pRT opened this issue Mar 2, 2000 · 1 comment
Closed

print on closed filehandle Sys::Syslog::CONS #1257

p5pRT opened this issue Mar 2, 2000 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Mar 2, 2000

Migrated from rt.perl.org#2251 (status was 'resolved')

Searchable as RT2251$

@p5pRT
Copy link
Author

p5pRT commented Mar 2, 2000

From [email protected]

This is a bug report for perl from ask@​lbrain.valueclick.com,
generated with the help of perlbug 1.26 running under perl 5.00503.


Sys​::Syslog seems to assumes that it can print to /dev/console.

I'm not sure if that's a valid assumption. If not then something like
this should be applied to avoid unnecessary warnings.

*** Syslog.pm.org Thu Mar 2 19​:44​:15 2000
--- Syslog.pm Thu Mar 2 19​:46​:06 2000
***************
*** 225,234 ****
  }
  }
  else {
! open(CONS,">/dev/console");
! print CONS "<$facility.$priority>$whoami​: $message\r";
! exit if defined $pid; # if fork failed, we're parent
! close CONS;
  }
  }
  }
--- 225,235 ----
  }
  }
  else {
! if (open(CONS,">/dev/console")) {
! print CONS "<$facility.$priority>$whoami​: $message\r";
! exit if defined $pid; # if fork failed, we're parent
! close CONS;
! }
  }
  }
  }



Site configuration information for perl 5.00503​:

Configured by ask at Mon Jan 10 07​:01​:26 PST 2000.

Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration​:
  Platform​:
  osname=linux, osvers=2.2.12-20smp, archname=i686-linux
  uname='linux lbrain.valueclick.com 2.2.12-20smp #1 smp mon sep 27 10​:34​:45 edt 1999 i686 unknown '
  hint=recommended, useposix=true, d_sigaction=define
  usethreads=undef useperlio=undef d_sfio=undef
  Compiler​:
  cc='cc', optimize='-O6 -DAPPLLIB_EXP="/home/value/perl"', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
  cppflags='-Dbool=char -DHAS_BOOL'
  ccflags ='-Dbool=char -DHAS_BOOL'
  stdchar='char', d_stdstdio=undef, usevfork=false
  intsize=4, longsize=4, ptrsize=4, doublesize=8
  d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
  alignbytes=4, usemymalloc=n, prototype=define
  Linker and Libraries​:
  ld='cc', ldflags =' -L/usr/local/lib'
  libpth=/usr/local/lib /lib /usr/lib
  libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt
  libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking​:
  dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
  cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'

Locally applied patches​:
 


@​INC for perl 5.00503​:
  /home/value/perl
  /home/value/apps/perl5.005_03/lib/5.00503/i686-linux
  /home/value/apps/perl5.005_03/lib/5.00503
  /home/value/apps/perl5.005_03/lib/site_perl/5.005/i686-linux
  /home/value/apps/perl5.005_03/lib/site_perl/5.005
  .


Environment for perl 5.00503​:
  HOME=/home/ask
  LANG=en_US
  LANGUAGE (unset)
  LC_ALL=en_US
  LD_LIBRARY_PATH (unset)
  LOGDIR (unset)
  PATH=/usr/bin​:/bin​:/usr/bin​:/usr/X11R6/bin​:/home/ask/bin
  PERL_BADLANG (unset)
  SHELL=/bin/bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant