POSIX::WNOHANG redefined

Discussion in 'Perl Misc' started by Myron Turner, Sep 23, 2005.

  1. Myron Turner

    Myron Turner Guest

    I'm using a child handler which I've used elsewhere on various
    systems, but currently I am getting this message:

    POSIX::WNOHANG redefined

    my handler is as follows:

    sub childhandler {

    while((my $retv = waitpid( -1, &POSIX::WNOHANG() ))>0) {
    $wait_pid[$wait_index] = $retv;
    $wait_index++;
    }
    $SIG{CHLD} = \&childhandler;
    }


    I've tried this various ways:

    waitpid( -1, &POSIX::WNOHANG)
    waitpid( -1, &WNOHANG)
    waitpid( -1,WNOHANG)

    I've always used the latter without any trouble.

    Thanks,

    Myron Turner
     
    Myron Turner, Sep 23, 2005
    #1
    1. Advertising

  2. Myron Turner wrote:

    > I'm using a child handler which I've used elsewhere on various
    > systems, but currently...


    So the versions of Perl on the various systems might be relevant.

    > ... I am getting this message:
    >
    > POSIX::WNOHANG redefined


    Is that really the exact message? Does it not mention the line at which
    the redefinition is happening? What does that line look like?

    > my handler is as follows:


    How do you know that this is the relevant bit of code to show us?

    Please post a _minimal_ but _complete_ script that produces the warning.
     
    Brian McCauley, Sep 23, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    629
    Victor Bazarov
    Apr 1, 2005
  2. Wei Li

    function redefined problem

    Wei Li, Aug 25, 2004, in forum: C Programming
    Replies:
    11
    Views:
    702
    Wei Li
    Aug 27, 2004
  3. irfanhab
    Replies:
    1
    Views:
    464
    Nick Keighley
    Aug 23, 2006
  4. deanfamily
    Replies:
    4
    Views:
    417
    puzzlecracker
    Oct 24, 2005
  5. MiG
    Replies:
    8
    Views:
    150
    Ryan Leavengood
    Oct 19, 2005
Loading...

Share This Page