summaryrefslogtreecommitdiffstats
path: root/src/rccexternal.c
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2013-11-13 19:26:15 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2013-11-13 19:26:15 +0100
commit2e1a735c1bb76094744a6112b092331e34c7db09 (patch)
tree7d71a21f6e193d6a67bba0275d01613ca658e20a /src/rccexternal.c
parent91522bd0b3cff351252ebbdbd23e1a2a02688394 (diff)
downloadlibrcc-2e1a735c1bb76094744a6112b092331e34c7db09.tar.gz
librcc-2e1a735c1bb76094744a6112b092331e34c7db09.tar.bz2
librcc-2e1a735c1bb76094744a6112b092331e34c7db09.tar.xz
librcc-2e1a735c1bb76094744a6112b092331e34c7db09.zip
Respect warn_unused_result warnings
Diffstat (limited to 'src/rccexternal.c')
-rw-r--r--src/rccexternal.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/rccexternal.c b/src/rccexternal.c
index 74e1ef3..1667ba8 100644
--- a/src/rccexternal.c
+++ b/src/rccexternal.c
@@ -271,9 +271,14 @@ again:
void rccExternalClose(int s) {
#ifdef HAVE_SYS_SOCKET_H
+ ssize_t ret;
unsigned char cmd = 0;
if (s != -1) {
- write(s, &cmd, 1);
+retry:
+ ret = write(s, &cmd, 1);
+ // retry once on signal
+ if ((ret < 0)&&(errno == EINTR))
+ ret = write(s, &cmd, 1);
close(s);
}
#endif /* HAVE_SYS_SOCKET_H */