rewrite Wx2 for posix