From 5015b05fc495bf3e87f8decfd1617a4a399939d4 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Sat, 18 Jun 2022 15:59:12 +0200 Subject: Replaced Linux syscall macros by libc macros. User-space programs should use the SYS_*form, as documented in syscall(2). That also adds compatibility to non-Linux systems. --- src/nxt_process.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nxt_process.h') diff --git a/src/nxt_process.h b/src/nxt_process.h index 694f457e..642c3419 100644 --- a/src/nxt_process.h +++ b/src/nxt_process.h @@ -19,7 +19,7 @@ * fork(2) calls. As we use clone(2) for container, it returns the wrong pid. */ #define nxt_getpid() \ - syscall(__NR_getpid) + syscall(SYS_getpid) #else #define nxt_getpid() \ getpid() -- cgit From 900828cc4b92e95b4810c00df9759ab9a07429c7 Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Thu, 17 Feb 2022 12:33:46 +0000 Subject: Fixing isolated process PID manipulation. Registering an isolated PID in the global PID hash is wrong because it can be duplicated. Isolated processes are stored only in the children list until the response for the WHOAMI message is processed and the global PID is discovered. To remove isolated siblings, a pointer to the children list is introduced in the nxt_process_init_t struct. This closes #633 issue on GitHub. --- src/nxt_process.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nxt_process.h') diff --git a/src/nxt_process.h b/src/nxt_process.h index 642c3419..15fd4e7f 100644 --- a/src/nxt_process.h +++ b/src/nxt_process.h @@ -148,6 +148,8 @@ typedef struct { const nxt_port_handlers_t *port_handlers; const nxt_sig_event_t *signals; + + nxt_queue_t *siblings; } nxt_process_init_t; -- cgit