Edit report at https://bugs.php.net/bug.php?id=64536&edit=1

 ID:                 64536
 User updated by:    perepechaev at inbox dot ru
 Reported by:        perepechaev at inbox dot ru
 Summary:            socket_read: the connection is hung
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            ncurses related
 Operating System:   FreeBSD 8.2-RELEASE i386
 PHP Version:        5.4.13
 Block user comment: N
 Private report:     N

 New Comment:

Accept my sorry 
I think I need to handle the system interrupt

pcntl_signal(28, SIG_IGN, true);


Previous Comments:
------------------------------------------------------------------------
[2013-03-28 07:47:25] perepechaev at inbox dot ru

Description:
------------
I run a connection and get a break when trying to resize a window


Test script:
---------------
<?php

$address = 'localhost';
$port = 9002;

$socket = @socket_create( AF_INET, SOCK_STREAM, SOL_TCP);
$connected = 0;
if ( $socket ){
    $conected = socket_connect( $socket, $address, $port);
}

ncurses_init();
ncurses_refresh();

while (true){
    $server = @socket_read( $socket, 1024 * 8);
        if ( $server ){
            ncurses_addstr("SERVER\n");
        }
        else {
            // ERROR: Interrupted system call
            ncurses_addstr("ERROR: " . 
socket_strerror(socket_last_error($socket)) . "\n");
    }
    ncurses_refresh();
}




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64536&edit=1

Reply via email to