Patchwork Add CLONE_PIDFD from Linux 5.2 to bits/sched.h

login
register
mail settings
Submitter Joseph Myers
Date Aug. 5, 2019, 9:05 p.m.
Message ID <alpine.DEB.2.21.1908052105150.25360@digraph.polyomino.org.uk>
Download mbox | patch
Permalink /patch/33973/
State New
Headers show

Comments

Joseph Myers - Aug. 5, 2019, 9:05 p.m.
This patch adds the CLONE_PIDFD constant from Linux 5.2 to glibc's
bits/sched.h.

Tested for x86_64.

2019-08-05  Joseph Myers  <joseph@codesourcery.com>

	* sysdeps/unix/sysv/linux/bits/sched.h [__USE_GNU] (CLONE_PIDFD):
	New macro.
Christian Brauner - Aug. 5, 2019, 9:17 p.m.
On August 5, 2019 5:05:45 PM EDT, Joseph Myers <joseph@codesourcery.com> wrote:
>This patch adds the CLONE_PIDFD constant from Linux 5.2 to glibc's
>bits/sched.h.
>
>Tested for x86_64.
>
>2019-08-05  Joseph Myers  <joseph@codesourcery.com>
>
>	* sysdeps/unix/sysv/linux/bits/sched.h [__USE_GNU] (CLONE_PIDFD):
>	New macro.
>
>diff --git a/sysdeps/unix/sysv/linux/bits/sched.h
>b/sysdeps/unix/sysv/linux/bits/sched.h
>index 828b878696..b67820cb49 100644
>--- a/sysdeps/unix/sysv/linux/bits/sched.h
>+++ b/sysdeps/unix/sysv/linux/bits/sched.h
>@@ -44,6 +44,8 @@
># define CLONE_FS      0x00000200 /* Set if fs info shared between
>processes.  */
># define CLONE_FILES   0x00000400 /* Set if open files shared between
>processes.  */
># define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared.  */
>+# define CLONE_PIDFD   0x00001000 /* Set if a pidfd should be placed
>+				     in parent.  */
># define CLONE_PTRACE  0x00002000 /* Set if tracing continues on the
>child.  */
># define CLONE_VFORK   0x00004000 /* Set if the parent wants the child
>to
> 				     wake it up on mm_release.  */

Acked-by: Christian Brauner <christian.brauner@ubuntu.com>

Patch

diff --git a/sysdeps/unix/sysv/linux/bits/sched.h b/sysdeps/unix/sysv/linux/bits/sched.h
index 828b878696..b67820cb49 100644
--- a/sysdeps/unix/sysv/linux/bits/sched.h
+++ b/sysdeps/unix/sysv/linux/bits/sched.h
@@ -44,6 +44,8 @@ 
 # define CLONE_FS      0x00000200 /* Set if fs info shared between processes.  */
 # define CLONE_FILES   0x00000400 /* Set if open files shared between processes.  */
 # define CLONE_SIGHAND 0x00000800 /* Set if signal handlers shared.  */
+# define CLONE_PIDFD   0x00001000 /* Set if a pidfd should be placed
+				     in parent.  */
 # define CLONE_PTRACE  0x00002000 /* Set if tracing continues on the child.  */
 # define CLONE_VFORK   0x00004000 /* Set if the parent wants the child to
 				     wake it up on mm_release.  */