1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-09 13:46:33 +00:00

Made code async-signal-safe

This commit is contained in:
Gerhard Rieger 2015-01-12 21:46:16 +01:00
parent e4c6f3d934
commit 2af0495cc6
25 changed files with 1707 additions and 625 deletions

View file

@ -7,6 +7,7 @@
#include "xiosysincludes.h"
#include "compat.h"
#include "xio.h"
#include "error.h"
/* this function closes all open xio sockets on exit, if they are still open.
@ -14,9 +15,12 @@
void xioexit(void) {
int i;
diag_in_handler = 0;
Debug("starting xioexit()");
for (i = 0; i < XIO_MAXSOCK; ++i) {
if (sock[i] != NULL && sock[i]->tag != XIO_TAG_INVALID) {
xioclose(sock[i]);
}
}
Debug("finished xioexit()");
}