develooper Front page | perl.perl5.porters | Postings from November 2003

[perl #24536] Perl 5.6.1 -- sigaction - SIGxxx handler not defined

From:
perlbug-followup
Date:
November 21, 2003 21:04
Subject:
[perl #24536] Perl 5.6.1 -- sigaction - SIGxxx handler not defined
Message ID:
rt-24536-67717.12.3057895808923@rt.perl.org
# New Ticket Created by  chaim.frenkel@csam.com 
# Please include the string:  [perl #24536]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=24536 >



This is a bug report for perl from chaimf@pobox.com
generated with the help of perlbug 1.33 running under perl v5.6.1.


-----------------------------------------------------------------
[Please enter your report here]

I'm limited to using 5.6.1, and when trying:

	sigaction SIGALRM, new POSIX::SigAction \&c;

First time through the subroutine appears not to be called

On subsequent cycles the folowing warning appears

	SIGALRM handler "CODE(0x40068bd4)" not defined.

This does not happen with 5.8.2.

Sample code:
---
#!/opt/perl/bin/perl

use POSIX qw(:signal_h);
$| = 1;

sub c()
{
	print "[$$]: sa_handler invoked <", join(",", @_), ">\n";
}

#
# This works
#
#sigaction SIGALRM, new POSIX::SigAction "c";
#

#
#	This does not work
#
sigaction SIGALRM, new POSIX::SigAction \&c;
#
# First time through appears not to be called
# On subsequent cycles the folowing warning appears
#	SIGALRM handler "CODE(0x40068bd4)" not defined.
#

for $i (1..3) {
	alarm($i);
	print "[$$]: Waiting in select for alarm $i\n";
	$r = $w = $e = "";
	$ret = select($r, $w, $e, undef);
	print "[$$]: Select returned $ret\n";
}
exit 0;
---



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

Configured by gsar at Mon Jun 17 20:59:16 PDT 2002.

Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
  Platform:
    osname=hpux, osvers=11.00, archname=PA-RISC1.1-thread-multi
    uname='hp-ux llbertha b.11.00 u 9000800 2002402864 unlimited-user license '
    config_args='-des -Dcf_by=ActiveState -Dcf_email=ActivePerl@ActiveState.com -Uinstallusrbinperl -Ud_sigsetjmp -Dusethreads -Duseithreads -Duselargefiles -Dinc_version_list=5.6.0/$archname 5.6.0 -Dcc=gcc -Accflags=-mpa-risc-1-1 -fPIC -Dd_attribut=undef -Darchname=PA-RISC1.1 -Dcccdlflags=-fPIC -Dprefix=/opt/perl'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
    cc='gcc', ccflags ='-DUSE_REENTRANT_API -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -mpa-risc-1-1 -fPIC -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-DUSE_REENTRANT_API -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -mpa-risc-1-1 -fPIC -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.9-hppa-991112', gccosandvers='hpux11.00'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    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=n, prototype=define
  Linker and Libraries:
    ld='ld', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
    libs=-lnsl -lnm -lndbm -lmalloc -ldld -lm -lpthread -lc -lndir -lcrypt -lsec
    perllibs=-lnsl -lnm -lmalloc -ldld -lm -lpthread -lc -lndir -lcrypt -lsec
    libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E '
    cccdlflags='-fPIC', lddlflags='-b -L/usr/local/lib'

Locally applied patches:
    ACTIVEPERL_LOCAL_PATCHES_ENTRY

---
@INC for perl v5.6.1:
    /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi
    /opt/perl/lib/5.6.1
    /opt/perl/lib/site_perl/5.6.1/PA-RISC1.1-thread-multi
    /opt/perl/lib/site_perl/5.6.1
    /opt/perl/lib/site_perl
    .

---
Environment for perl v5.6.1:
    HOME=/u1/bea/cfx
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/upgrade/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11://opt/perl/bin:/opt/resmon/bin:/usr/sbin/diag/contrib:/opt/pred/bin:/opt/hparray/bin:/opt/perf/bin:/usr/local/bin:/opt/sudo.v1.5.7p4:/opt/hpnp//bin:/opt/ignite/bin:/opt/aCC/bin:/opt/cxperf/bin:/opt/langtools/bin:/opt/imake/bin:/sybase/ASE-12_5/bin:/sybase/OCS-12_5/bin/:/sybase/CFG-1_0/bin:/opt/OV/bin/OpC:/opt/langtools/bin:/opt/sec_mgmt/spc/bin:/opt/emc/WideSky/V5.1.0/bin:/opt/gnome/bin:.
    PERL_BADLANG (unset)
    SHELL=/usr/bin/ksh
    SHLIB_PATH (unset)





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