Moved up menu_wchan acquiring to before thread is forked