dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[dotgnu-pnet-commits] pnet ChangeLog support/socket.c


From: Heiko Weiss
Subject: [dotgnu-pnet-commits] pnet ChangeLog support/socket.c
Date: Thu, 23 Nov 2006 11:07:58 +0000

CVSROOT:        /sources/dotgnu-pnet
Module name:    pnet
Changes by:     Heiko Weiss <brubbel>   06/11/23 11:07:58

Modified files:
        .              : ChangeLog 
        support        : socket.c 

Log message:
        fixed that socket gets closed if app was killed.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pnet/ChangeLog?cvsroot=dotgnu-pnet&r1=1.3389&r2=1.3390
http://cvs.savannah.gnu.org/viewcvs/pnet/support/socket.c?cvsroot=dotgnu-pnet&r1=1.25&r2=1.26

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/ChangeLog,v
retrieving revision 1.3389
retrieving revision 1.3390
diff -u -b -r1.3389 -r1.3390
--- ChangeLog   13 Nov 2006 18:06:08 -0000      1.3389
+++ ChangeLog   23 Nov 2006 11:07:58 -0000      1.3390
@@ -1,3 +1,7 @@
+2006-11-23  Heiko Weiss <address@hidden>
+
+       * support/socket.c: fixed that socket gets closed if app was killed.
+
 2006-11-13  Klaus Treichel  <address@hidden>
 
        * engine/cvm_inline.c, engine/lib_reflect.c: Change the

Index: support/socket.c
===================================================================
RCS file: /sources/dotgnu-pnet/pnet/support/socket.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- support/socket.c    24 Aug 2006 22:07:26 -0000      1.25
+++ support/socket.c    23 Nov 2006 11:07:58 -0000      1.26
@@ -33,6 +33,7 @@
 #define        HAVE_SETSOCKOPT         1
 #define        HAVE_GETSOCKOPT         1
 #else
+#include <fcntl.h>
 #if TIME_WITH_SYS_TIME
        #include <sys/time.h>
     #include <time.h>
@@ -370,6 +371,8 @@
 
 ILSysIOHandle ILSysIOSocket(ILInt32 domain, ILInt32 type, ILInt32 protocol)
 {
+       int iSocket = 0;
+
 #ifdef IL_WIN32_NATIVE
        _ILWinSockInit();
 #endif
@@ -422,7 +425,9 @@
                break;
        }
        
-       return (ILSysIOHandle)(ILNativeInt)(socket(domain, type, protocol));
+       iSocket = socket(domain, type, protocol);
+       if( iSocket >= 0 ) fcntl( iSocket, F_SETFD, FD_CLOEXEC );       
+       return (ILSysIOHandle)(ILNativeInt)(iSocket);
 }
 
 int ILSysIOSocketBind(ILSysIOHandle sockfd, unsigned char *addr,




reply via email to

[Prev in Thread] Current Thread [Next in Thread]