Skip to content

Commit b147a22

Browse files
committed
ext/sockets: adding SO_NOSIGPIPE constant.
it s the macOs way to disable the SIGPIPE signal emission, same as doing `signal(SIGPIPE, SIG_IGN)` but on the socket level. Close GH-14065
1 parent b0da6ed commit b147a22

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ PHP NEWS
209209
(David Carlier)
210210
. Updated the socket_create_listen backlog argument default value to SOMAXCONN.
211211
(David Carlier)
212+
. Added the SO_NOSIGPIPE constant to control the generation of SIGPIPE for macOs.
213+
(David Carlier)
212214

213215
- SNMP:
214216
. Removed the deprecated inet_ntoa call support. (David Carlier)

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -611,6 +611,7 @@ PHP 8.4 UPGRADE NOTES
611611
. SOCK_DCCP (NetBSD only).
612612
. TCP_SYNCNT (Linux only).
613613
. SO_EXCLBIND (Solaris/Illumos only).
614+
. SO_NOSIGPIPE (macOs only).
614615

615616
- Sodium:
616617
. SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES

ext/sockets/sockets.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,13 @@
17821782
*/
17831783
const SO_EXCLUSIVEADDRUSE = UNKNOWN;
17841784
#endif
1785+
#if defined(SO_NOSIGPIPE)
1786+
/**
1787+
* @var int
1788+
* @cvalue SO_NOSIGPIPE
1789+
*/
1790+
const SO_NOSIGPIPE = UNKNOWN;
1791+
#endif
17851792
#if defined(TCP_QUICKACK)
17861793
/**
17871794
* @var int

ext/sockets/sockets_arginfo.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)