about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2021-10-16 08:02:27 +0200
committerGitHub <noreply@github.com>2021-10-16 08:02:27 +0200
commit29f05c62207c58a2dd11d10220175516a232b6f8 (patch)
tree9170460da6ee4af69928eaa7c40099b6bf2c629d
parent4fa5d6e5f8c5fb36f4df84860df4e127c1035a2f (diff)
parent024baa9c3229dfb32ce8db2f5434c4c24bd3dea6 (diff)
downloadrust-29f05c62207c58a2dd11d10220175516a232b6f8.tar.gz
rust-29f05c62207c58a2dd11d10220175516a232b6f8.zip
Rollup merge of #89921 - joshuaseaton:zircon-process, r=tmandry
[fuchsia] Update process info struct

The fuchsia platform is in the process of softly transitioning over to
using a new value for ZX_INFO_PROCESS with a new corresponding struct.
This change migrates libstd.

See [fxrev.dev/510478](https://fxrev.dev/510478) and [fxbug.dev/30751](https://fxbug.dev/30751) for more detail.
-rw-r--r--library/std/src/sys/unix/process/zircon.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/library/std/src/sys/unix/process/zircon.rs b/library/std/src/sys/unix/process/zircon.rs
index 58427bb8b69..4dfa2b4ff1e 100644
--- a/library/std/src/sys/unix/process/zircon.rs
+++ b/library/std/src/sys/unix/process/zircon.rs
@@ -25,9 +25,12 @@ pub const ZX_TASK_TERMINATED: zx_signals_t = ZX_OBJECT_SIGNAL_3;
 
 pub const ZX_RIGHT_SAME_RIGHTS: zx_rights_t = 1 << 31;
 
+// The upper four bits gives the minor version.
 pub type zx_object_info_topic_t = u32;
 
-pub const ZX_INFO_PROCESS: zx_object_info_topic_t = 3;
+pub const ZX_INFO_PROCESS: zx_object_info_topic_t = 3 | (1 << 28);
+
+pub type zx_info_process_flags_t = u32;
 
 pub fn zx_cvt<T>(t: T) -> io::Result<T>
 where
@@ -68,9 +71,9 @@ impl Drop for Handle {
 #[repr(C)]
 pub struct zx_info_process_t {
     pub return_code: i64,
-    pub started: bool,
-    pub exited: bool,
-    pub debugger_attached: bool,
+    pub start_time: zx_time_t,
+    pub flags: zx_info_process_flags_t,
+    pub reserved1: u32,
 }
 
 extern "C" {