develooper Front page | perl.perl5.porters | Postings from January 2001

[ID 20010124.001] POSIX::errno unreliable

From:
tds
Date:
January 24, 2001 07:04
Subject:
[ID 20010124.001] POSIX::errno unreliable
Message ID:
200101241453.OAA16593@livecell.cellnet.aldigital.co.uk
This is a bug report for perl from tds@livecell.cellnet.aldigital.co.uk,
generated with the help of perlbug 1.28 running under perl v5.6.0.


-----------------------------------------------------------------
[Please enter your report here]
#!/usr/bin/perl
use strict;
use POSIX qw(:signal_h :errno_h :sys_wait_h);
use Test;

# We ran into this problem using waitpid(), but it appears to be
# generally applicable to POSIX::errno. The "open" system call fails,
# (because "idonotexist" doesn't exist), and this is consistent with 
# $!, if you look at it. However, POSIX::errno, which should match
# the numeric equivalent of $!, doesn't.

# POSIX::errno appears to work sometimes (if you've done other things, such
# as wait()s...?) but not in an obviously predictable way.

# this test script seems to work under Perl5.005, but fails under 5.6.

BEGIN { plan tests => 1};

my $not = "idonotexist";
(!-e $not) or die "that will confuse this test case badly";

open FOO, $not;
my $e = POSIX::errno();
ok($e);



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=library
    severity=high
---
Site configuration information for perl v5.6.0:

Configured by root at Thu Nov  2 14:48:34 GMT 2000.

Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris
    uname='sunos livecell 5.6 generic_105181-17 sun4u sparc sunw,ultra-enterprise '
    config_args=''
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define 
    use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef
  Compiler:
    cc='cc', optimize='-O', gccversion=
    cppflags='-I/usr/local/include'
    ccflags ='-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64'
    stdchar='unsigned char', d_stdstdio=define, usevfork=false
    intsize=4, longsize=4, ptrsize=4, doublesize=8
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =' -L/usr/local/lib '
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc -lcrypt -lsec
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -L/usr/local/lib'

Locally applied patches:
    

---
@INC for perl v5.6.0:
    /usr/people/tds/work/catbert-cellnet-genie-lite/lib
    /usr/people/tds/work/catbert-cellnet-genie-modules/xslib
    /usr/local/lib/perl5/5.6.0/sun4-solaris
    /usr/local/lib/perl5/5.6.0
    /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.6.0
    /usr/local/lib/perl5/site_perl/5.005/sun4-solaris
    /usr/local/lib/perl5/site_perl/5.005
    /usr/local/lib/perl5/site_perl
    .

---
Environment for perl v5.6.0:
    HOME=/usr/people/tds
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/usr/aldl/informix/lib:/usr/aldl/informix/lib/esql:/usr/dt/lib:/usr/openwin/lib:/usr/ucblib:/usr/local/lib:/usr/local/pgsql/lib:/usr/aldl/informix/lib:/usr/aldl/informix/lib/esql
    LOGDIR (unset)
    PATH=/usr/bin:/usr/sbin:/sbin:/opt/WLtop/bin:/opt/SUNWsymon/bin:/opt/SUNWsymon/sbin:/opt/SUNWvts/bin:/usr/ccs/bin:/usr/lib/lp/bin:/usr/platform/sun4u/sbin:/opt/SUNWspro/bin:/usr/local/bin:/usr/local/netscape:/opt/FSFpatch/bin:/opt/FSFtexi/bin:/opt/FSFemacs/bin:/opt/FSFbash/bin:/usr/local/ssl/bin:/usr/openwin/bin:/opt/SUNWspro/SW3.1/bin:/opt/SUNWspro/bin:/bin:/usr/bin:/usr/ucb:/usr/bin/X11:/usr/local/bin:/usr/local/bin:/usr/sbin:/usr/local/bin:/usr/X/bin:/opt/FSFgzip/bin:/usr/ccs/bin:/usr/opt/SUNWmd/sbin:/var/qmail/bin:/opt/SUNWvxva/bin:/usr/aldl/informix/bin:/usr/afs/bin:/usr/aldl/support:/usr/aldl/informix/bin:/usr/people/tds/work/catbert-cellnet-genie-lite/util:/usr/people/tds/work/catbert-cellnet-genie-modules/handoff/version_control:.
    PERL5LIB=/usr/people/tds/work/catbert-cellnet-genie-lite/lib:/usr/people/tds/work/catbert-cellnet-genie-modules/xslib
    PERL_BADLANG (unset)
    SHELL=/usr/local/bin/bash




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About