[core] replace open() with fdevent_open_cloexec()