summaryrefslogtreecommitdiff
path: root/src/libunixonacid
diff options
context:
space:
mode:
Diffstat (limited to 'src/libunixonacid')
-rw-r--r--src/libunixonacid/skaclient_end.c3
-rw-r--r--src/libunixonacid/textclient_end.c3
2 files changed, 6 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 ;
}
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 ;
}