summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_clone.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_clone.h')
-rw-r--r--src/nxt_clone.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/nxt_clone.h b/src/nxt_clone.h
index dcccf1db..c2066ce6 100644
--- a/src/nxt_clone.h
+++ b/src/nxt_clone.h
@@ -3,8 +3,8 @@
* Copyright (C) NGINX, Inc.
*/
-#ifndef _NXT_CLONE_INCLUDED_
-#define _NXT_CLONE_INCLUDED_
+#ifndef _NXT_CLONE_H_INCLUDED_
+#define _NXT_CLONE_H_INCLUDED_
#if (NXT_HAVE_CLONE_NEWUSER)
@@ -36,10 +36,11 @@ typedef struct {
pid_t nxt_clone(nxt_int_t flags);
-#if (NXT_HAVE_CLONE_NEWUSER)
+#define nxt_is_clone_flag_set(flags, test) \
+ ((flags & CLONE_##test) == CLONE_##test)
+
-#define NXT_CLONE_USER(flags) \
- ((flags & CLONE_NEWUSER) == CLONE_NEWUSER)
+#if (NXT_HAVE_CLONE_NEWUSER)
NXT_EXPORT nxt_int_t nxt_clone_credential_map(nxt_task_t *task, pid_t pid,
nxt_credential_t *creds, nxt_clone_t *clone);
@@ -50,4 +51,5 @@ NXT_EXPORT nxt_int_t nxt_clone_vldt_credential_gidmap(nxt_task_t *task,
#endif
-#endif /* _NXT_CLONE_INCLUDED_ */
+
+#endif /* _NXT_CLONE_H_INCLUDED_ */