lkml.org 
[lkml]   [2022]   [Feb]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 26/42] tools/nolibc/stdlib: make raise() use the lower level syscalls only
Date
raise() doesn't set errno, so there's no point calling kill(), better
call sys_kill(), which also reduces the function's size.

Signed-off-by: Willy Tarreau <w@1wt.eu>
---
tools/include/nolibc/stdlib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/include/nolibc/stdlib.h b/tools/include/nolibc/stdlib.h
index db47362a750f..4cc1fdf6791e 100644
--- a/tools/include/nolibc/stdlib.h
+++ b/tools/include/nolibc/stdlib.h
@@ -317,7 +317,7 @@ int msleep(unsigned int msecs)
__attribute__((weak,unused))
int raise(int signal)
{
- return kill(getpid(), signal);
+ return sys_kill(sys_getpid(), signal);
}

static __attribute__((unused))
--
2.35.1
\
 
 \ /
  Last update: 2022-02-07 18:09    [W:0.248 / U:0.836 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site