1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

fix pipe detection for STDERR.

This commit is contained in:
George Wang
2025-09-06 12:38:13 -04:00
parent 9d69ab91ab
commit aa3983b31b

View File

@@ -635,8 +635,8 @@ static inline int isPipe( int fd )
{
char achPeer[128];
socklen_t len = 128;
if (( getpeername( fd, (struct sockaddr *)achPeer, &len ) != 0 )&&
( errno == ENOTCONN ))
if ((getpeername(fd, (struct sockaddr *)achPeer, &len) != 0 )
&& (errno == ENOTCONN || errno == ENOTSOCK))
return 0;
else
return 1;