split posix and win32 process code