Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Error message in log file is different from "die" message in code.

by Mask (Pilgrim)
on May 07, 2003 at 13:14 UTC ( #256189=note: print w/ replies, xml ) Need Help??


in reply to Re: Error message in log file is different from "die" message in code.
in thread Error message in log file is different from "die" message in code.

This is how $ready_socket created.

527>($r_ready, $w_ready, $e_ready) = IO::Select->select($read_set, $wr +ite_set, undef, 10); 528> foreach my $ready_socket (@$r_ready) { 529> if( $ready_socket==$server ) { # Incomming connection 530> warn "Server socket ready, accepting..."; 531> my $new_connection=$server->accept(); 532> # make the socket non-blocking 533> my $flags = fcntl($new_connection, F_GETFL, 0) 534> or die "cannot get flags for socket: $!\n"; 535> $flags = fcntl($new_connection, F_SETFL, $flags | O_NONBLO +CK) 536> or die "cannot set flags for socket: $!\n";
$server is created like this earlier.
my $server = IO::Socket::INET->new(LocalPort => $cfg->server_port, Type => SOCK_STREAM, Reuse => 1, Listen => 10, ) or die "could not become a tcp server on port ", $cfg->server_port, +" : $@\n";


Comment on Re: Re: Error message in log file is different from "die" message in code.
Select or Download Code
Re^3: Error message in log file is different from "die" message in code. (barked up the wrong tree..)
by Aristotle (Chancellor) on May 07, 2003 at 14:25 UTC
    That seems to be correct after some study of those modules' POD. The fact remains that $server->accept() is returning undef for failure - whatever the reason may be. Is there actually an external connection request at that point?

    Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://256189]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2015-07-03 03:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (48 votes), past polls