Ok. I have gotten the blocking() interface to set the blocking flag to 0, but unfortunately this has not resolved my problem with syswrite doing a blocking write.  Below are some snippets of my perl code and a print out from my logging.  The logging clearly shows that the sywrite is blocking.
 
Anyone have any idea how I can resolve this problem?
 
Are UNIX sockets able to work in a non-blocking mode?
 
Any help greatly appreciated,
kwo
 
 
           my $s = IO::Socket::UNIX->new(
                Type      => SOCK_STREAM,
                Local     => $sockname,
                Listen    => 10,
                ReuseAddr => 1,
            );
            if ( not $s ) {
                logerr("Can't create socket $sockname : $!");
                exit $PACE::Constants::DAEMON_EXIT;
            }
           
            # Vantive ? : Set the Socket to non-blocking.
            $s->blocking(0);
            my $tmp_val = $s->blocking();
            logdbg( 15, "Blocking flag = $tmp_val\n");
 
...
 
    logdbg(14, "writeSocket : File # $fn has $size bytes to send.\n");
 
    # if no data to write just return
    return if ($size == 0);
    
    $sent = syswrite $wh, $buf, $size;
    logdbg(14, "writeSocket : $size bytes attempted, $sent bytes written.\n");
...
 
06/01/31 15:49:56 Agent: writeSocket : File # 35 has 100098 bytes to send.
 
06/01/31 15:50:26 Agent: writeSocket : 100098 bytes attempted, 100098 bytes written.
 
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs