Resolve an evport bug in the thread/forking test

This commit is contained in:
Nick Mathewson 2010-11-19 17:09:30 -05:00
parent 8faf223ac5
commit 3a67d0bf42

View File

@ -214,10 +214,15 @@ thread_basic(void *arg)
event_add(notification_event, NULL); event_add(notification_event, NULL);
if ((pid = fork()) == 0) { if ((pid = fork()) == 0) {
event_del(notification_event);
if (event_reinit(base) < 0) { if (event_reinit(base) < 0) {
TT_FAIL(("reinit")); TT_FAIL(("reinit"));
exit(1); exit(1);
} }
event_assign(notification_event, base,
base->th_notify_fd[0], EV_READ|EV_PERSIST,
notify_fd_cb, NULL);
event_add(notification_event, NULL);
goto child; goto child;
} }