about summary refs log tree commit diff
path: root/src/libunixonacid/textclient_end.c
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 07:28:05 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-07-21 07:28:05 +0000
commit0a181fc1b38a62e583f13ccc1550f7ffc8f5896b (patch)
tree3317e6a0288817585f26e7a4140efdf76b6f6768 /src/libunixonacid/textclient_end.c
parentf09ad31e00c22086863b95d3b6cb8eeadfdcdef7 (diff)
downloadskalibs-0a181fc1b38a62e583f13ccc1550f7ffc8f5896b.tar.gz
skalibs-0a181fc1b38a62e583f13ccc1550f7ffc8f5896b.tar.xz
skalibs-0a181fc1b38a62e583f13ccc1550f7ffc8f5896b.zip
Add unlink_void, change dir_close, prepare for 2.7.0.0
Diffstat (limited to 'src/libunixonacid/textclient_end.c')
-rw-r--r--src/libunixonacid/textclient_end.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libunixonacid/textclient_end.c b/src/libunixonacid/textclient_end.c
index 58fc930..1ddf93f 100644
--- a/src/libunixonacid/textclient_end.c
+++ b/src/libunixonacid/textclient_end.c
@@ -1,5 +1,6 @@
 /* ISC license. */
 
+#include <errno.h>
 #include <skalibs/djbunix.h>
 #include <skalibs/textmessage.h>
 #include <skalibs/textclient.h>
@@ -15,8 +16,10 @@ void textclient_end (textclient_t *a)
   textmessage_receiver_free(&a->asyncin) ;
   if (a->pid && a->options & TEXTCLIENT_OPTION_WAITPID)
   {
+    int e = errno ;
     int wstat ;
     waitpid_nointr(a->pid, &wstat, 0) ;
+    errno = e ;
   }
   *a = textclient_zero ;
 }