From 27a560102054d5c4c349aebc05723817dc5016fd Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Wed, 9 Feb 2022 21:37:56 -0800 Subject: [PATCH] Change estimated error code when thread spawning fails --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 63324fd..77b7311 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,10 +57,10 @@ pub unsafe extern "C" fn pthread_create( if handle.is_null() { // There was some error, but libctru doesn't expose the result. - // We assume there was an incorrect parameter (such as too low of a priority). + // We assume there was permissions issue (such as too low of a priority). // We also need to clean up the closure at this time. drop(Box::from_raw(main)); - return libc::EINVAL; + return libc::EPERM; } *native = handle as _;