summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_process.h
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2022-11-18 23:42:44 +0000
committerAndrew Clayton <a.clayton@nginx.com>2022-11-18 23:42:44 +0000
commitb7f1d7253a8f44f31c2e1a8d9c8962ef30be83e9 (patch)
tree2d1c9b0f240f8667fcbabcd617fbef2e539511ec /src/nxt_process.h
parent0277d8f1034f6f3dcdb5fd88dc3a9a3f04c1de89 (diff)
downloadunit-b7f1d7253a8f44f31c2e1a8d9c8962ef30be83e9.tar.gz
unit-b7f1d7253a8f44f31c2e1a8d9c8962ef30be83e9.tar.bz2
Isolation: Rename NXT_HAVE_CLONE -> NXT_HAVE_LINUX_NS.
Due to the need to replace our use of clone/__NR_clone on Linux with fork(2)/unshare(2) for enabling Linux namespaces(7) to keep the pthreads(7) API working. Let's rename NXT_HAVE_CLONE to NXT_HAVE_LINUX_NS, i.e name it after the feature, not how it's implemented, then in future if we change how we do namespaces again we don't have to rename this. Reviewed-by: Alejandro Colomar <alx@nginx.com> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to '')
-rw-r--r--src/nxt_process.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_process.h b/src/nxt_process.h
index 0db68d45..1dd51521 100644
--- a/src/nxt_process.h
+++ b/src/nxt_process.h
@@ -7,13 +7,13 @@
#ifndef _NXT_PROCESS_H_INCLUDED_
#define _NXT_PROCESS_H_INCLUDED_
-#if (NXT_HAVE_CLONE)
+#if (NXT_HAVE_LINUX_NS)
#include <unistd.h>
#include <nxt_clone.h>
#endif
-#if (NXT_HAVE_CLONE)
+#if (NXT_HAVE_LINUX_NS)
/*
* Old glibc wrapper for getpid(2) returns a cached pid invalidated only by
* fork(2) calls. As we use clone(2) for container, it returns the wrong pid.
@@ -100,7 +100,7 @@ typedef struct {
nxt_cgroup_t cgroup;
#endif
-#if (NXT_HAVE_CLONE)
+#if (NXT_HAVE_LINUX_NS)
nxt_clone_t clone;
#endif