fork. support multiple options. use fdatasync instead of fsync