Serenity Operating System
1/*
2 * Copyright (c) 2021, the SerenityOS developers.
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#include <Kernel/Process.h>
8
9namespace Kernel {
10
11ErrorOr<FlatPtr> Process::sys$fsync(int fd)
12{
13 VERIFY_NO_PROCESS_BIG_LOCK(this);
14 TRY(require_promise(Pledge::stdio));
15 auto description = TRY(open_file_description(fd));
16 TRY(description->sync());
17 return 0;
18}
19
20}