summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/conn-tools/s6-tcpserver4d.c3
-rw-r--r--src/conn-tools/s6-tcpserver6d.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/conn-tools/s6-tcpserver4d.c b/src/conn-tools/s6-tcpserver4d.c
index 6165d2f..ace550a 100644
--- a/src/conn-tools/s6-tcpserver4d.c
+++ b/src/conn-tools/s6-tcpserver4d.c
@@ -222,7 +222,7 @@ static inline void run_child (int s, uint32_t ip, uint16_t port, unsigned int nu
{
char fmt[74] ;
size_t n = 0 ;
- PROG = "s6-tcpserver (child)" ;
+ PROG = "s6-tcpserver4d (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 ;
@@ -253,6 +253,7 @@ static inline void new_connection (int s, uint32_t ip, uint16_t port, char const
else if (!pid)
{
selfpipe_finish() ;
+ sig_restore(SIGPIPE) ;
run_child(s, ip, port, num+1, argv) ;
}
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) ;
}