POSIX::WNOHANG redefined

M

Myron Turner

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
 
B

Brian McCauley

Myron said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top