From e249d751c8cdc2f65bed4c998f790d8f4bcbc66a Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Sat, 4 Feb 2023 14:14:21 +0000 Subject: [PATCH] Kernel: Return ENAMETOOLONG when trying to set a too-long thread name --- Kernel/Syscalls/thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp index 46e120a74a..72c2ca2354 100644 --- a/Kernel/Syscalls/thread.cpp +++ b/Kernel/Syscalls/thread.cpp @@ -187,7 +187,7 @@ ErrorOr Process::sys$set_thread_name(pid_t tid, Userspace const size_t max_thread_name_size = 64; if (name->length() > max_thread_name_size) - return EINVAL; + return ENAMETOOLONG; auto thread = Thread::from_tid(tid); if (!thread || thread->pid() != pid())