apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r355145 - in /apr/apr/branches/1.2.x: network_io/unix/sockets.c test/testsock.c threadproc/unix/procsup.c
Date Thu, 08 Dec 2005 17:24:43 GMT
Author: jorton
Date: Thu Dec  8 09:24:36 2005
New Revision: 355145

URL: http://svn.apache.org/viewcvs?rev=355145&view=rev
Log:
Merge r348405, r349408, r355141 from trunk:

* test/testsock.c (setup_socket): Set REUSEADDR option before binding
socket.

* threadproc/unix/procsup.c (apr_proc_detach): Check chdir() return
value (fixes gcc warning with modern glibc and -D_FORTIFY_SOURCE=2).

* network_io/unix/sockets.c: Remove stray semi-colon after
APR_POOL_IMPLEMENT_ACCESSOR.

PR: 37840

Modified:
    apr/apr/branches/1.2.x/network_io/unix/sockets.c
    apr/apr/branches/1.2.x/test/testsock.c
    apr/apr/branches/1.2.x/threadproc/unix/procsup.c

Modified: apr/apr/branches/1.2.x/network_io/unix/sockets.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/network_io/unix/sockets.c?rev=355145&r1=355144&r2=355145&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/network_io/unix/sockets.c (original)
+++ apr/apr/branches/1.2.x/network_io/unix/sockets.c Thu Dec  8 09:24:36 2005
@@ -422,7 +422,7 @@
     return APR_SUCCESS;
 }
 
-APR_POOL_IMPLEMENT_ACCESSOR(socket);
+APR_POOL_IMPLEMENT_ACCESSOR(socket)
 
 APR_IMPLEMENT_INHERIT_SET(socket, inherit, pool, socket_cleanup)
 

Modified: apr/apr/branches/1.2.x/test/testsock.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/test/testsock.c?rev=355145&r1=355144&r2=355145&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/test/testsock.c (original)
+++ apr/apr/branches/1.2.x/test/testsock.c Thu Dec  8 09:24:36 2005
@@ -84,6 +84,9 @@
 
     rv = apr_socket_create(&sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, p);
     APR_ASSERT_SUCCESS(tc, "Problem creating socket", rv);
+
+    rv = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
+    APR_ASSERT_SUCCESS(tc, "Could not set REUSEADDR on socket", rv);
     
     rv = apr_socket_bind(sock, sa);
     APR_ASSERT_SUCCESS(tc, "Problem binding to port", rv);

Modified: apr/apr/branches/1.2.x/threadproc/unix/procsup.c
URL: http://svn.apache.org/viewcvs/apr/apr/branches/1.2.x/threadproc/unix/procsup.c?rev=355145&r1=355144&r2=355145&view=diff
==============================================================================
--- apr/apr/branches/1.2.x/threadproc/unix/procsup.c (original)
+++ apr/apr/branches/1.2.x/threadproc/unix/procsup.c Thu Dec  8 09:24:36 2005
@@ -20,7 +20,10 @@
 {
     int x;
 
-    chdir("/");
+    if (chdir("/") == -1) {
+        return errno;
+    }
+
 #if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(BEOS)
     /* Don't detach for MPE because child processes can't survive the death of
      * the parent. */



Mime
View raw message