From:             [EMAIL PROTECTED]
Operating system: Linux RedHat 7.2
PHP version:      4.0CVS-2002-04-28
PHP Bug Type:     Sockets related
Bug description:  Seg. fault on socket_close if socket died

I had that issue :
I use a non blocking socket to read a data stream.

I was assuming that if socket_read($socket) !== false then I should close
the socket !!
NO ! I must not !
If I close that socket, I have an error : 9975 Segmentation fault     
/usr/local/php-cgi/bin/php -q ./core.php

I checked socket_last_error and I found : 104 : Connexion reset by peer
....

It would be nice if the socket is checked before socket_close or
socket_shutdown ...

I don't know sockets system under Linux . I can't fix that :(

To have the same error, create a socket, listen on it, accept accept that
connexion. On the remote machine, close the telnet (kill or other :D) and
then do socket_close on your socket.
Then you have a seg. fault !
-- 
Edit bug report at http://bugs.php.net/?id=16886&edit=1
-- 
Fixed in CVS:        http://bugs.php.net/fix.php?id=16886&r=fixedcvs
Fixed in release:    http://bugs.php.net/fix.php?id=16886&r=alreadyfixed
Need backtrace:      http://bugs.php.net/fix.php?id=16886&r=needtrace
Try newer version:   http://bugs.php.net/fix.php?id=16886&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=16886&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=16886&r=notwrong
Not enough info:     http://bugs.php.net/fix.php?id=16886&r=notenoughinfo
Submitted twice:     http://bugs.php.net/fix.php?id=16886&r=submittedtwice

Reply via email to