Skip to content

Commit 34f55c0

Browse files
committed
copy sigpipe stuff from other memcache mock test
silently ended ./testall in backport git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1936967 13f79535-47bb-0310-9956-ffa450edef68
1 parent 98a4c6d commit 34f55c0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

test/testmemcache.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -815,6 +815,11 @@ static void test_version_responses(abts_case *tc, void *data)
815815
{
816816
apr_status_t rv;
817817
char *result;
818+
#ifdef SIGPIPE
819+
apr_sigfunc_t *old_action;
820+
821+
old_action = apr_signal(SIGPIPE, SIG_IGN);
822+
#endif
818823

819824
/* --- good response ------------------------------------------------ */
820825
abts_log_message("version test: sending 'VERSION 1.5.22\\r\\n', expecting APR_SUCCESS");
@@ -851,6 +856,10 @@ static void test_version_responses(abts_case *tc, void *data)
851856
abts_log_message("version test: rv=%d result='%s'", rv, result ? result : "(null)");
852857
ABTS_ASSERT(tc, "single-char VERSION should succeed", rv == APR_SUCCESS);
853858
ABTS_STR_EQUAL(tc, "1", result);
859+
860+
#ifdef SIGPIPE
861+
apr_signal(SIGPIPE, old_action);
862+
#endif
854863
}
855864

856865
abts_suite *testmemcache(abts_suite * suite)

0 commit comments

Comments
 (0)