Skip to content

Commit

Permalink
force fork test using epoll or kqueue
Browse files Browse the repository at this point in the history
  • Loading branch information
Coldwings committed Jul 4, 2023
1 parent 80d82e9 commit 3c8f151
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions io/test/test-fork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ int fork_parent_process() {
return m_pid;
}
photon::fini();
photon::init(photon::INIT_EVENT_DEFAULT, photon::INIT_IO_LIBCURL);
photon::init(photon::INIT_EVENT_EPOLL | photon::INIT_EVENT_KQUEUE,
photon::INIT_IO_LIBCURL);

photon::block_all_signal();
photon::sync_signal(SIGINT, &sigint_handler);
Expand Down Expand Up @@ -221,7 +222,8 @@ TEST(ForkTest, ForkInThread) {
}

TEST(ForkTest, PopenInThread) {
photon::init(photon::INIT_EVENT_DEFAULT, photon::INIT_IO_LIBCURL);
photon::init(photon::INIT_EVENT_EPOLL | photon::INIT_EVENT_KQUEUE,
photon::INIT_IO_LIBCURL);
DEFER(photon::fini());

photon::semaphore sem(0);
Expand Down

0 comments on commit 3c8f151

Please sign in to comment.