From 4d777a9bf486399da10be89b9cdb7236351a0964 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 30 Jan 2021 23:38:57 +0100 Subject: [PATCH] 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". --- Kernel/Syscalls/thread.cpp | 4 ++-- 1 file 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 + * Copyright (c) 2018-2021, Andreas Kling * 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 exit_value) int Process::sys$set_thread_name(pid_t tid, Userspace 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;