|
1 | 1 | use crate::off64_t;
|
2 | 2 | use crate::prelude::*;
|
3 | 3 |
|
| 4 | +use super::_IO; |
| 5 | +use super::_IOWR; |
| 6 | + |
4 | 7 | pub type pthread_t = c_ulong;
|
5 | 8 | pub type __priority_which_t = c_uint;
|
6 | 9 | pub type __rlimit_resource_t = c_uint;
|
@@ -414,6 +417,23 @@ s! {
|
414 | 417 | __pos: off64_t,
|
415 | 418 | __state: crate::mbstate_t,
|
416 | 419 | }
|
| 420 | + |
| 421 | + pub struct pidfd_info { |
| 422 | + mask: crate::__u64, |
| 423 | + cgroupid: crate::__u64, |
| 424 | + pid: crate::__u32, |
| 425 | + tgid: crate::__u32, |
| 426 | + ppid: crate::__u32, |
| 427 | + ruid: crate::__u32, |
| 428 | + rgid: crate::__u32, |
| 429 | + euid: crate::__u32, |
| 430 | + egid: crate::__u32, |
| 431 | + suid: crate::__u32, |
| 432 | + sgid: crate::__u32, |
| 433 | + fsuid: crate::__u32, |
| 434 | + fsgid: crate::__u32, |
| 435 | + exit_code: crate::__s32, |
| 436 | + } |
417 | 437 | }
|
418 | 438 |
|
419 | 439 | impl siginfo_t {
|
@@ -757,13 +777,31 @@ pub const RTLD_DI_TLS_DATA: c_int = 10;
|
757 | 777 | pub const SOCK_NONBLOCK: c_int = O_NONBLOCK;
|
758 | 778 |
|
759 | 779 | pub const PIDFD_NONBLOCK: c_uint = O_NONBLOCK as c_uint;
|
760 |
| -// libc-test failure. To new? |
761 |
| -// pub const PIDFD_THREAD: c_uint = O_EXCL as c_uint; |
762 |
| - |
763 |
| -// libc-test failure. To new? |
764 |
| -// pub const PIDFD_SIGNAL_THREAD: c_uint = 1; |
765 |
| -// pub const PIDFD_SIGNAL_THREAD_GROUP: c_uint = 2; |
766 |
| -// pub const PIDFD_SIGNAL_PROCESS_GROUP: c_uint = 4; |
| 780 | +pub const PIDFD_THREAD: c_uint = O_EXCL as c_uint; |
| 781 | + |
| 782 | +pub const PIDFD_SIGNAL_THREAD: c_uint = 1; |
| 783 | +pub const PIDFD_SIGNAL_THREAD_GROUP: c_uint = 2; |
| 784 | +pub const PIDFD_SIGNAL_PROCESS_GROUP: c_uint = 4; |
| 785 | + |
| 786 | +pub const PIDFD_INFO_PID: c_uint = 1; |
| 787 | +pub const PIDFD_INFO_CREDS: c_uint = 2; |
| 788 | +pub const PIDFD_INFO_CGROUPID: c_uint = 4; |
| 789 | +pub const PIDFD_INFO_EXIT: c_uint = 8; |
| 790 | + |
| 791 | +pub const PIDFD_INFO_SIZE_VER0: c_uint = 64; |
| 792 | + |
| 793 | +const PIDFS_IOCTL_MAGIC: c_uint = 0xFF; |
| 794 | +pub const PIDFD_GET_CGROUP_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 1); |
| 795 | +pub const PIDFD_GET_IPC_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 2); |
| 796 | +pub const PIDFD_GET_MNT_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 3); |
| 797 | +pub const PIDFD_GET_NET_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 4); |
| 798 | +pub const PIDFD_GET_PID_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 5); |
| 799 | +pub const PIDFD_GET_PID_FOR_CHILDREN_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 6); |
| 800 | +pub const PIDFD_GET_TIME_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 7); |
| 801 | +pub const PIDFD_GET_TIME_FOR_CHILDREN_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 8); |
| 802 | +pub const PIDFD_GET_USER_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 9); |
| 803 | +pub const PIDFD_GET_UTS_NAMESPACE: c_uint = _IO(PIDFS_IOCTL_MAGIC, 10); |
| 804 | +pub const PIDFD_GET_INFO: c_uint = _IOWR::<pidfd_info>(PIDFS_IOCTL_MAGIC, 11); |
767 | 805 |
|
768 | 806 | pub const SOL_RXRPC: c_int = 272;
|
769 | 807 | pub const SOL_PPPOL2TP: c_int = 273;
|
|
0 commit comments