SPUG: alarm problems in daemon on HPUX

Mark Mertel mmertel at ix.netcom.com
Wed Sep 6 15:30:56 CDT 2000


all,

here's a puzzler:

a daemon program which forks() at startup and does a POSIX::setsid
immediately after, then sets an alarm for so many seconds until the
process should go into a sleep state. i have it running on two machines,
same program, some slight perl discrepencies, and on 1 machine, it works
properly and logs messages indicating it received the ALRM and went to
sleep. on the other machine, no such log messages are written. not sure
whether or not it goes to sleep - its a late night thing. i have checked
the ALRM during waking hours and it logs properly. below are the output
from perl -V for the two machines. the top one is the one that doesn't
write log entries. i'm thinking i might need to rebuild perl, but
wishin'i didn't have too.


> farmc1a# perl -V
> Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>   Platform:
>     osname=hpux, osvers=10.20, archname=PA-RISC1.1
>     uname='hp-ux ural b.10.20 a 9000712 2015389465 two-user license '
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef useperlio=undef d_sfio=undef
>   Compiler:
>     cc='cc', optimize='-O +Onolimit', gccversion=
>     cppflags='-Ae'
>     ccflags ='-Ae'
>     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
>     alignbytes=8, usemymalloc=y, prototype=define
>   Linker and Libraries:
>     ld='ld', ldflags =''
>     libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib
>     libs=-lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt
>     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 -Wl,-B,deferred '
>     cccdlflags='+z', lddlflags='-b -s -a shared'
>
>
> Characteristics of this binary (from libperl):
>   Built under hpux
>   Compiled at Feb 24 2000 12:24:57
>   @INC:
>     /opt/perl5/lib/5.00503/PA-RISC1.1
>     /opt/perl5/lib/5.00503
>     /opt/perl5/lib/site_perl/5.005/PA-RISC1.1
>     /opt/perl5/lib/site_perl/5.005
>     .
>
>
> # perl -V
> Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
>   Platform:
>     osname=hpux, osvers=10.20, archname=PA-RISC2.0
>     uname='hp-ux sc_web1 b.10.20 a 9000800 2004967135 two-user license '
>     hint=recommended, useposix=true, d_sigaction=define
>     usethreads=undef useperlio=undef d_sfio=undef
>   Compiler:
>     cc='cc', optimize='-O', gccversion=
>     cppflags='-D_HPUX_SOURCE -Aa -I/usr/local/include'
>     ccflags ='-D_HPUX_SOURCE -Aa -I/usr/local/include'
>     stdchar='unsigned char', d_stdstdio=define, usevfork=false
>     intsize=4, longsize=4, ptrsize=4, doublesize=8
>     d_longlong=undef, longlongsize=, d_longdbl=define, longdblsize=16
>     alignbytes=8, usemymalloc=y, prototype=define
>   Linker and Libraries:
>     ld='ld', ldflags =' -L/usr/local/lib'
>     libpth=/usr/local/lib /lib/pa1.1 /lib /usr/lib /usr/ccs/lib
>     libs=-lnsl_s -lndbm -ldld -lm -lc -lndir -lcrypt
>     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 -Wl,-B,deferred '
>     cccdlflags='+z', lddlflags='-b -L/usr/local/lib'
>
>
> Characteristics of this binary (from libperl):
>   Built under hpux
>   Compiled at Feb  4 2000 18:54:23
>   @INC:
>     /opt/perl5/lib/5.00503/PA-RISC2.0
>     /opt/perl5/lib/5.00503
>     /opt/perl5/lib/site_perl/5.005/PA-RISC2.0
>     /opt/perl5/lib/site_perl/5.005
>     .
>
>


 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list