summaryrefslogtreecommitdiff
path: root/src/conn-tools/s6-tcpserver6d.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2021-05-22 04:27:43 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2021-05-22 04:27:43 +0000
commita32bdcb06acf0428b4babe6f8342a3f962fd5b39 (patch)
treee2ad69f391b3119133102af8a1c046f09ad9eba8 /src/conn-tools/s6-tcpserver6d.c
parentb7c8979175f313314acec906577c54d48a8c6688 (diff)
downloads6-networking-a32bdcb06acf0428b4babe6f8342a3f962fd5b39.tar.xz
bugfix: tcpserver should unignore SIGPIPE
Diffstat (limited to 'src/conn-tools/s6-tcpserver6d.c')
-rw-r--r--src/conn-tools/s6-tcpserver6d.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/conn-tools/s6-tcpserver6d.c b/src/conn-tools/s6-tcpserver6d.c
index 57b4a9b..7f0135b 100644
--- a/src/conn-tools/s6-tcpserver6d.c
+++ b/src/conn-tools/s6-tcpserver6d.c
@@ -228,7 +228,7 @@ static inline void run_child (int s, char const *ip, uint16_t port, unsigned int
{
char fmt[98] ;
size_t n = 0 ;
- PROG = "s6-tcpserver6 (child)" ;
+ PROG = "s6-tcpserver6d (child)" ;
if ((fd_move(1, s) < 0) || (fd_copy(0, 1) < 0))
strerr_diefu1sys(111, "move fds") ;
memcpy(fmt+n, "PROTO=TCP\0TCPREMOTEIP=", 22) ; n += 22 ;
@@ -259,6 +259,7 @@ static inline void new_connection (int s, char const *ip, uint16_t port, char co
else if (!pid)
{
selfpipe_finish() ;
+ sig_restore(SIGPIPE) ;
run_child(s, ip, port, num+1, argv) ;
}