]> git.baikalelectronics.ru Git - kernel.git/commit
samples: make pidfd-metadata fail gracefully on older kernels
authorDmitry V. Levin <ldv@altlinux.org>
Sun, 23 Jun 2019 11:28:00 +0000 (14:28 +0300)
committerChristian Brauner <christian@brauner.io>
Mon, 24 Jun 2019 13:55:50 +0000 (15:55 +0200)
commit85d14e75dfb41a0318884f8cbd612cd96ee0a836
tree49430f9d17dcbc8c1d47b1cd5b15426a5ec6ba0d
parent8cb8b3c94f9e7ac4fd2e088961ac5524d8ee732f
samples: make pidfd-metadata fail gracefully on older kernels

Initialize pidfd to an invalid descriptor, to fail gracefully on
those kernels that do not implement CLONE_PIDFD and leave pidfd
unchanged.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Signed-off-by: Christian Brauner <christian@brauner.io>
samples/pidfd/pidfd-metadata.c