subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1544253 - /subversion/trunk/subversion/svnserve/svnserve.c
Date Thu, 21 Nov 2013 17:21:16 GMT
Author: julianfoad
Date: Thu Nov 21 17:21:15 2013
New Revision: 1544253

URL: http://svn.apache.org/r1544253
Log:
* subversion/svnserve/svnserve.c
  (sub_main): Catch some socket initialization errors that were being ignored.

Modified:
    subversion/trunk/subversion/svnserve/svnserve.c

Modified: subversion/trunk/subversion/svnserve/svnserve.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnserve/svnserve.c?rev=1544253&r1=1544252&r2=1544253&view=diff
==============================================================================
--- subversion/trunk/subversion/svnserve/svnserve.c (original)
+++ subversion/trunk/subversion/svnserve/svnserve.c Thu Nov 21 17:21:15 2013
@@ -1091,7 +1091,11 @@ sub_main(int *exit_code, int argc, const
 
   /* Prevents "socket in use" errors when server is killed and quickly
    * restarted. */
-  apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
+  status = apr_socket_opt_set(sock, APR_SO_REUSEADDR, 1);
+  if (status)
+    {
+      return svn_error_wrap_apr(status, _("Can't set options on server socket"));
+    }
 
   status = apr_socket_bind(sock, sa);
   if (status)
@@ -1099,10 +1103,15 @@ sub_main(int *exit_code, int argc, const
       return svn_error_wrap_apr(status, _("Can't bind server socket"));
     }
 
-  apr_socket_listen(sock, ACCEPT_BACKLOG);
+  status = apr_socket_listen(sock, ACCEPT_BACKLOG);
+  if (status)
+    {
+      return svn_error_wrap_apr(status, _("Can't listen on server socket"));
+    }
 
 #if APR_HAS_FORK
   if (run_mode != run_mode_listen_once && !foreground)
+    /* ### ignoring errors... */
     apr_proc_detach(APR_PROC_DETACH_DAEMONIZE);
 
   apr_signal(SIGCHLD, sigchld_handler);



Mime
View raw message