From f49a45f6a8d80e2733919db0a26b1c50323a2952 Mon Sep 17 00:00:00 2001 From: Olaf Barthel Date: Wed, 29 Sep 2004 17:03:57 +0000 Subject: [PATCH] - The socket exit code now calls the common stdio function which flushes and shuts down all buffered and unbuffered files. git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14743 87f5fb63-7c3d-0410-a384-fd976d0f7a62 --- library/changes | 3 +++ library/socket_init_exit.c | 13 ++----------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/library/changes b/library/changes index d9daf04..92ca471 100644 --- a/library/changes +++ b/library/changes @@ -28,6 +28,9 @@ c.lib 1.177 (29.9.2004) - Added strtoll() and strtoull(), with further changes to and . +- The socket exit code now calls the common stdio function which + flushes and shuts down all buffered and unbuffered files. + c.lib 1.175 (10.9.2004) diff --git a/library/socket_init_exit.c b/library/socket_init_exit.c index c4deb9c..6c43552 100644 --- a/library/socket_init_exit.c +++ b/library/socket_init_exit.c @@ -1,5 +1,5 @@ /* - * $Id: socket_init_exit.c,v 1.3 2004-09-29 14:17:44 obarthel Exp $ + * $Id: socket_init_exit.c,v 1.4 2004-09-29 17:03:57 obarthel Exp $ * * :ts=4 * @@ -111,16 +111,7 @@ CLIB_DESTRUCTOR(__socket_exit) * does not happen, the stdio cleanup function will * crash (with bells on). */ - if(__fd != NULL && __num_fd > 0) - { - int i; - - for(i = 0 ; i < __num_fd ; i++) - { - if(FLAG_IS_SET(__fd[i]->fd_Flags,FDF_IS_SOCKET) && FLAG_IS_SET(__fd[i]->fd_Flags,FDF_IN_USE)) - close(i); - } - } + __close_all_files(); #if defined(__amigaos4__) {