Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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 drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-11-28 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (192 votes), past polls