From b075b81cd347aaf3c170940819d6857e0f67e75e Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sun, 27 Dec 2015 09:26:54 +0300 Subject: [PATCH] test/regress: cover signals after fork() + event_reinit() Regression-for: ad0c237 ("event_reinit: always re-init signal's socketpair") --- test/regress.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/regress.c b/test/regress.c index d200ae35..7d785904 100644 --- a/test/regress.c +++ b/test/regress.c @@ -832,7 +832,7 @@ static void test_fork(void) { int status; - struct event ev, sig_ev; + struct event ev, sig_ev, usr_ev; pid_t pid; setup_test("After fork: "); @@ -867,6 +867,10 @@ test_fork(void) evsignal_del(&sig_ev); + evsignal_set(&usr_ev, SIGUSR1, fork_signal_cb, &usr_ev); + evsignal_add(&usr_ev, NULL); + raise(SIGUSR1); + called = 0; event_dispatch(); @@ -908,6 +912,10 @@ test_fork(void) shutdown(pair[0], SHUT_WR); + evsignal_set(&usr_ev, SIGUSR1, fork_signal_cb, &usr_ev); + evsignal_add(&usr_ev, NULL); + raise(SIGUSR1); + event_dispatch(); evsignal_del(&sig_ev); -- 2.40.0