|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2004-10-11 01:20 UTC] wez@php.net
  [2004-10-11 16:46 UTC] nlopess@php.net
  [2020-02-07 06:11 UTC] phpdocbot@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 06:00:01 2025 UTC | 
Description: ------------ when I use the STREAM_CLIENT_ASYNC_CONNECT flag to my stream_socket_client() call, it just doesn't connect() at all. Reproduce code: --------------- <? echo "trying ...\n"; stream_socket_client("tcp://127.0.0.1:80", $errno, $errstr, 10, STREAM_CLIENT_ASYNC_CONNECT); sleep(10); ?> Actual result: -------------- using strace on the following script gives : -------------------------------------------- write(1, "trying ...\n", 11trying ... ) = 11 rt_sigprocmask(SIG_BLOCK, [CHLD], [RTMIN], 8) = 0 rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0 rt_sigprocmask(SIG_SETMASK, [RTMIN], NULL, 8) = 0 nanosleep({10, 0}, {10, 0}) = 0 -------------------------------------------- in other words the connect() syscall is never called at all between the echo and sleep. on the other hand, when I remove STREAM_CLIENT_ASYNC_CONNECT, connect() is called.