test_fork(void)
{
int status;
- struct event ev, sig_ev;
+ struct event ev, sig_ev, usr_ev;
pid_t pid;
setup_test("After fork: ");
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();
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);