I'm working on a old programm which uses the forks perl module.
the linux server has crashed and the server has been reinstalled.

It seems that this programm doesn't work any more.
I've reinstalled a perl distribution with the fork module. here my configuration :

[admWifi@stat1 ActivePerl-5.8]$ perl -V Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=linux, osvers=2.2.17, archname=i686-linux-thread-multi uname='linux gimlet 2.2.17 #1 sun jun 25 09:24:41 est 2000 i686 un +known ' config_args='-ders -Dcc=gcc -Accflags=-DNO_HASH_SEED -Dusethreads +-Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclib +pth= -Duselargefiles -Uusemallocwrap -Dinc_version_list=5.8.3/$archna +me 5.8.3 5.8.2/$archname 5.8.2 5.8.1/$archname 5.8.1 5.8.0/$archname +5.8.0 -Duseshrplib -Dprefix=/wifi/ActivePerl-5.8 -Dcf_by=ActiveState +-Dcf_email=support@ActiveState.com' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemulti +plicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS + -DNO_HASH_SEED -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFS +ET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DNO_HASH +_SEED -fno-strict-aliasing' ccversion='', gccversion='2.95.2 20000220 (Debian GNU/Linux)', gcc +osandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=1 +2 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', + lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags ='' libpth=/lib /usr/lib /usr/local/lib libs=-lnsl -lndbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc -lpos +ix perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -lposix libc=/lib/libc-2.1.3.so, so=so, useshrplib=true, libperl=libperl.s +o gnulibc_version='2.1.3' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E - +Wl,-rpath,/wifi/ActivePerl-5.8/lib/5.8.4/i686-linux-thread-multi/CORE +' cccdlflags='-fpic', lddlflags='-shared' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL +_IMPLICIT_CONTEXT Locally applied patches: ActivePerl Build 810 22751 Update to Test.pm 1.25 21540 Fix backward-compatibility issues in if.pm Built under linux Compiled at Jun 3 2004 12:38:49 @INC: /wifi/ActivePerl-5.8/lib/5.8.4/i686-linux-thread-multi /wifi/ActivePerl-5.8/lib/5.8.4 /wifi/ActivePerl-5.8/lib/site_perl/5.8.4/i686-linux-thread-multi /wifi/ActivePerl-5.8/lib/site_perl/5.8.4 /wifi/ActivePerl-5.8/lib/site_perl

i've isolated a pb with the ping command.
when i add the line "use forks " in a little basic
programm, ping returns a bad statut :
#! /opt/ActivePerl-5.8/bin/perl use forks; use forks::shared; use Net::Ping::External qw(ping); if (! ping(host => "10.163.123.98", timeout => 2) ) { print "ping ko\n"; } else { print "ping ok \n"; } exit 1;

returns "ping ko"

#! /opt/ActivePerl-5.8/bin/perl #use forks; #use forks::shared; use Net::Ping::External qw(ping); if (! ping(host => "10.163.123.98", timeout => 2) ) { print "ping ko\n"; } else { print "ping ok \n"; } exit 1;

returns "ping ok"

Do you have any ideas about this pb ?
PS : The same little program works with the forks module on another server.

In reply to bad ping status with the forks module by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.