You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
702 B

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /* source: xioexit.c */
  2. /* Copyright Gerhard Rieger and contributors (see file CHANGES) */
  3. /* Published under the GNU General Public License V.2, see file COPYING */
  4. /* this file contains the source for the extended exit function */
  5. #include "xiosysincludes.h"
  6. #include "compat.h"
  7. #include "xio.h"
  8. #include "error.h"
  9. /* this function closes all open xio sockets on exit, if they are still open.
  10. It must be registered with atexit(). */
  11. void xioexit(void) {
  12. int i;
  13. diag_in_handler = 0;
  14. Debug("starting xioexit()");
  15. for (i = 0; i < XIO_MAXSOCK; ++i) {
  16. if (sock[i] != NULL && sock[i]->tag != XIO_TAG_INVALID) {
  17. xioclose(sock[i]);
  18. }
  19. }
  20. Debug("finished xioexit()");
  21. }