Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.9k stars 541 forks source link

Can't set $0 with perl-5.8.0 on linux #6277

Closed p5pRT closed 21 years ago

p5pRT commented 21 years ago

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

Searchable as RT20731$

p5pRT commented 21 years ago

From jean-luc@picard.franken.de

Created by jean-luc@picard.franken.de

I can't assign a new value to $0 with perl-5.8.0 on linux​:

/tmp> cat test.pl #!/usr/bin/perl -w

use strict;

sub BAR() {   $0="FOO [foobar]";   sleep(100); }

BAR();

/tmp> /tmp/perl58/bin/perl -w /tmp/test.pl & /tmp> ps auxww [...] jean-luc 27541 0.6 0.3 4376 1164 pts/17 S 18​:33 0​:00 /tmp/perl58/bin/perl -w /tmp/test.pl /tmp> /usr/bin/perl -w /tmp/test.pl & /tmp> ps auxww [...] jean-luc 27549 1.0 0.3 4100 1076 pts/17 S 18​:34 0​:00 FOO [foobar] /tmp> uname -a Linux picard 2.4.18 #10 Fre Jan 3 16​:48​:32 CET 2003 i686 unknown unknown GNU/Linux

Is there any reason why this is the case? http​://dev.perl.org/perl5/news/2002/07/18/580ann/perldelta.html only states that "Setting $0 now works" for "All BSDs"\, not that it's now broken for linux...

Some misplaced "#ifdef" or something?

Perl Info ``` Flags: category=core severity=low Site configuration information for perl v5.8.0: Configured by jean-luc at Wed Feb 5 17:48:12 CET 2003. Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=linux, osvers=2.4.18, archname=i686-linux uname='linux picard 2.4.18 #10 fre jan 3 16:48:32 cet 2003 i686 unknown unknown gnulinux ' config_args='prefix=/tmp/perl58' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O3', cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='2.95.4 20011002 (Debian prerelease)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldb -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.3.1.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='2.3.1' 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 v5.8.0: /tmp/perl58/lib/5.8.0/i686-linux /tmp/perl58/lib/5.8.0 /tmp/perl58/lib/site_perl/5.8.0/i686-linux /tmp/perl58/lib/site_perl/5.8.0 /tmp/perl58/lib/site_perl . Environment for perl v5.8.0: HOME=/home/jean-luc LANG=de_DE LANGUAGE (unset) LC_COLLATE=C LC_MESSAGES=en_US LD_LIBRARY_PATH=/home/jean-luc/lib:/home/oracle/OraHome1/lib/ LOGDIR (unset) PATH=/usr/lib/compilercache:/home/jean-luc/Software/JDK/j2sdk1.4.1//bin:/home/jean-luc/bin:/usr/local/bin/X11:/usr/local/bin:/bin:/usr/X11R6/bin:/usr/bin:/usr/sbin:/usr/bin/X11:/local/bin:/usr/games:/usr/lib/mutt:/home/oracle/OraHome1/bin:/usr/lib/ICAClient:/home/jean-luc/TO/Software/SAP/610/opt/PlatinGUI/bin/ PERL_BADLANG (unset) SHELL=/usr/bin/zsh ```
p5pRT commented 21 years ago

From @eserte

"jean-luc@​picard.franken.de (via RT)" \perlbug\-followup@​perl\.org writes​:

# New Ticket Created by jean-luc@​picard.franken.de # Please include the string​: [perl #20731] # in the subject line of all future correspondence about this issue. # \<URL​: http​://rt.perl.org/rt2/Ticket/Display.html?id=20731 >

This is a bug report for perl from jean-luc@​picard.franken.de\, generated with the help of perlbug 1.34 running under perl v5.8.0.

----------------------------------------------------------------- [Please enter your report here] I can't assign a new value to $0 with perl-5.8.0 on linux​:

/tmp> cat test.pl #!/usr/bin/perl -w

use strict;

sub BAR() { $0="FOO [foobar]"; sleep(100); }

BAR();

/tmp> /tmp/perl58/bin/perl -w /tmp/test.pl & /tmp> ps auxww [...] jean-luc 27541 0.6 0.3 4376 1164 pts/17 S 18​:33 0​:00 /tmp/perl58/bin/perl -w /tmp/test.pl /tmp> /usr/bin/perl -w /tmp/test.pl & /tmp> ps auxww [...] jean-luc 27549 1.0 0.3 4100 1076 pts/17 S 18​:34 0​:00 FOO [foobar] /tmp> uname -a Linux picard 2.4.18 #10 Fre Jan 3 16​:48​:32 CET 2003 i686 unknown unknown GNU/Linux

Is there any reason why this is the case? http​://dev.perl.org/perl5/news/2002/07/18/580ann/perldelta.html only states that "Setting $0 now works" for "All BSDs"\, not that it's now broken for linux...

Some misplaced "#ifdef" or something?

This is a known bug and I think it is already corrected in perl-5.8.1-to-be. See the snapshot​:

  http​://www.iki.fi/jhi/perl@​18449.tbz

Regards\,   Slaven

[Please do not change anything below this line] ----------------------------------------------------------------- --- Flags​: category=core severity=low --- Site configuration information for perl v5.8.0​:

Configured by jean-luc at Wed Feb 5 17​:48​:12 CET 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration​: Platform​: osname=linux\, osvers=2.4.18\, archname=i686-linux uname='linux picard 2.4.18 #10 fre jan 3 16​:48​:32 cet 2003 i686 unknown unknown gnulinux ' config_args='prefix=/tmp/perl58' hint=recommended\, useposix=true\, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n\, bincompat5005=undef Compiler​: cc='cc'\, ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'\, optimize='-O3'\, cppflags='-fno-strict-aliasing -I/usr/local/include' ccversion=''\, gccversion='2.95.4 20011002 (Debian prerelease)'\, gccosandvers='' intsize=4\, longsize=4\, ptrsize=4\, doublesize=8\, byteorder=1234 d_longlong=define\, longlongsize=8\, d_longdbl=define\, longdblsize=12 ivtype='long'\, ivsize=4\, nvtype='double'\, nvsize=8\, Off_t='off_t'\, lseeksize=8 alignbytes=4\, prototype=define Linker and Libraries​: ld='cc'\, ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldb -ldl -lm -lc -lcrypt -lutil perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil libc=/lib/libc-2.3.1.so\, so=so\, useshrplib=false\, libperl=libperl.a gnulibc_version='2.3.1' 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 v5.8.0​: /tmp/perl58/lib/5.8.0/i686-linux /tmp/perl58/lib/5.8.0 /tmp/perl58/lib/site_perl/5.8.0/i686-linux /tmp/perl58/lib/site_perl/5.8.0 /tmp/perl58/lib/site_perl .

--- Environment for perl v5.8.0​: HOME=/home/jean-luc LANG=de_DE LANGUAGE (unset) LC_COLLATE=C LC_MESSAGES=en_US LD_LIBRARY_PATH=/home/jean-luc/lib​:/home/oracle/OraHome1/lib/ LOGDIR (unset) PATH=/usr/lib/compilercache​:/home/jean-luc/Software/JDK/j2sdk1.4.1//bin​:/home/jean-luc/bin​:/usr/local/bin/X11​:/usr/local/bin​:/bin​:/usr/X11R6/bin​:/usr/bin​:/usr/sbin​:/usr/bin/X11​:/local/bin​:/usr/games​:/usr/lib/mutt​:/home/oracle/OraHome1/bin​:/usr/lib/ICAClient​:/home/jean-luc/TO/Software/SAP/610/opt/PlatinGUI/bin/ PERL_BADLANG (unset) SHELL=/usr/bin/zsh

-- Slaven Rezic - slaven@​rezic.de   BBBike - route planner for cyclists in Berlin   WWW version​: http​://www.bbbike.de   Perl/Tk version for Unix and Windows​: http​://bbbike.sourceforge.net

p5pRT commented 21 years ago

From @eserte

"jean-luc@​picard.franken.de (via RT)" \perlbug\-followup@&#8203;perl\.org writes​:

[...]

Sorry\, the URL should read​: http​://www.iki.fi/jhi/perl@​18639.tgz

Regards\,   Slaven

-- Slaven Rezic - slaven@​rezic.de   babybike - routeplanner for cyclists in Berlin   handheld (e.g. Compaq iPAQ with Linux) version of bbbike   http​://bbbike.sourceforge.net

p5pRT commented 21 years ago

From jean-luc@picard.franken.de

slaven@​rezic.de (via RT) wrote [2003/02/05 20​:20]​:

"jean-luc@​picard.franken.de (via RT)" \perlbug\-followup@&#8203;perl\.org writes​:

[...]

Sorry\, the URL should read​: http​://www.iki.fi/jhi/perl@​18639.tgz

Yes\, that fixes the problem. Thanks :-)

Regards\, Slaven

Ciao\, Thomas

-- Thomas Köhler Email​: jean-luc@​picard.franken.de | LCARS - Linux   \<>\< WWW​: http​://jeanluc-picard.de | for Computers   IRC​: jeanluc | on All Real   PGP public key available from Homepage! | Starships

p5pRT commented 21 years ago

arthur@contiller.se - Status changed from 'new' to 'resolved'

p5pRT commented 21 years ago

From jean-luc@picard.franken.de

Hi\,

slaven@​rezic.de (via RT) wrote [2003/02/05 20​:10]​:

This is a known bug and I think it is already corrected in perl-5.8.1-to-be. See the snapshot​:

http&#8203;://www\.iki\.fi/jhi/perl@&#8203;18449\.tbz

Not Found The requested URL /~jhi/perl@​18449.tbz was not found on this server.

Apache/1.3.27 Server at www.hut.fi Port 80

Bye\, Thomas

-- Thomas Köhler Email​: jean-luc@​picard.franken.de | LCARS - Linux   \<>\< WWW​: http​://jeanluc-picard.de | for Computers   IRC​: jeanluc | on All Real   PGP public key available from Homepage! | Starships

p5pRT commented 21 years ago

arthur@contiller.se - Status changed from 'open' to 'resolved'