diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-30 23:38:57 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-30 23:38:57 +0100 |
commit | 4d777a9bf486399da10be89b9cdb7236351a0964 (patch) | |
tree | 3d823b0607780f1efb739b45910a7833887a0416 /Kernel/Syscalls/thread.cpp | |
parent | ded78fc0747ee45d4ca81bd21e51c09f3d80e232 (diff) | |
download | serenity-4d777a9bf486399da10be89b9cdb7236351a0964.zip |
Kernel: Allow changing thread names with the "stdio" promise
It's useful for programs to change their thread names to say something
interesting about what they are working on. Let's not require "thread"
for this since single-threaded programs may want to do it without
pledging "thread".
Diffstat (limited to 'Kernel/Syscalls/thread.cpp')
-rw-r--r-- | Kernel/Syscalls/thread.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp index 31fe733f43..5f975c8ffd 100644 --- a/Kernel/Syscalls/thread.cpp +++ b/Kernel/Syscalls/thread.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org> + * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -150,7 +150,7 @@ int Process::sys$join_thread(pid_t tid, Userspace<void**> exit_value) int Process::sys$set_thread_name(pid_t tid, Userspace<const char*> user_name, size_t user_name_length) { - REQUIRE_PROMISE(thread); + REQUIRE_PROMISE(stdio); auto name = copy_string_from_user(user_name, user_name_length); if (name.is_null()) return -EFAULT; |