summaryrefslogtreecommitdiff
path: root/src/libunixonacid/skaclient_end.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid/skaclient_end.c')
-rw-r--r--src/libunixonacid/skaclient_end.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libunixonacid/skaclient_end.c b/src/libunixonacid/skaclient_end.c
index 23dafab..1b24303 100644
--- a/src/libunixonacid/skaclient_end.c
+++ b/src/libunixonacid/skaclient_end.c
@@ -1,5 +1,6 @@
/* ISC license. */
+#include <errno.h>
#include <skalibs/djbunix.h>
#include <skalibs/skaclient.h>
#include <skalibs/unixmessage.h>
@@ -14,8 +15,10 @@ void skaclient_end (skaclient_t *a)
unixmessage_receiver_free(&a->asyncin) ;
if (a->pid && a->options & SKACLIENT_OPTION_WAITPID)
{
+ int e = errno ;
int wstat ;
waitpid_nointr(a->pid, &wstat, 0) ;
+ errno = e ;
}
*a = skaclient_zero ;
}