On 2024/01/30 6:15, Daniel Sahlberg wrote:
> Good catch! How about:
>
> [[[
> Index: subversion/svnserve/svnserve.c
> ===================================================================
> --- subversion/svnserve/svnserve.c (revision 1915424)
> +++ subversion/svnserve/svnserve.c (working copy)
> @@ -574,7 +574,7 @@ accept_connection(connection_t **connection,
> || APR_STATUS_IS_ECONNABORTED(status)
> || APR_STATUS_IS_ECONNRESET(status));
>
> - return status
> + return status && !sigtermint_seen
> ? svn_error_wrap_apr(status, _("Can't accept client connection"))
> : SVN_NO_ERROR;
> }
> ]]]
The `sigtermint_seen` variable is not defined if sigaction is unavailable.
Instead, how about the following patch?
[[[
Index: subversion/svnserve/svnserve.c
===================================================================
--- subversion/svnserve/svnserve.c (revision 1915466)
+++ subversion/svnserve/svnserve.c (working copy)
@@ -574,9 +574,14 @@ accept_connection(connection_t **connection,
|| APR_STATUS_IS_ECONNABORTED(status)
|| APR_STATUS_IS_ECONNRESET(status));
- return status
- ? svn_error_wrap_apr(status, _("Can't accept client connection"))
- : SVN_NO_ERROR;
+ if (!status)
+ return SVN_NO_ERROR;
+#if APR_HAVE_SIGACTION
+ else if (sigtermint_seen)
+ return SVN_NO_ERROR;
+#endif
+ else
+ return svn_error_wrap_apr(status, _("Can't accept client connection"));
}
/* Add a reference to CONNECTION, i.e. keep it and it's pool valid unless
]]]
--
Jun Omae <[email protected]> (大前 潤)