diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2019-09-24 21:34:44 -0700 |
|---|---|---|
| committer | Tyler Mandry <tmandry@gmail.com> | 2019-09-25 15:26:42 -0700 |
| commit | 80db06d6daa290fbc722fbae6dbfa0728ca259b5 (patch) | |
| tree | bdc280e1a17f02b1d55a30cde069f77cad466202 /src/libstd/sys/unix/process/zircon.rs | |
| parent | 6c2c29c43206d6e2f1091fa278d2792ea10e3659 (diff) | |
| download | rust-80db06d6daa290fbc722fbae6dbfa0728ca259b5.tar.gz rust-80db06d6daa290fbc722fbae6dbfa0728ca259b5.zip | |
Fix ExitStatus on Fuchsia
Fuchsia exit codes don't follow the convention of libc::WEXITSTATUS et al, and they are 64 bits instead of 32 bits. This gives Fuchsia its own representation of ExitStatus. Additionally, the zircon syscall structs were out of date, causing us to see bogus return codes.
Diffstat (limited to 'src/libstd/sys/unix/process/zircon.rs')
| -rw-r--r-- | src/libstd/sys/unix/process/zircon.rs | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/libstd/sys/unix/process/zircon.rs b/src/libstd/sys/unix/process/zircon.rs index 1ba48de3c07..188a6b5f2da 100644 --- a/src/libstd/sys/unix/process/zircon.rs +++ b/src/libstd/sys/unix/process/zircon.rs @@ -65,29 +65,14 @@ impl Drop for Handle { } } -// Common ZX_INFO header -#[derive(Default)] -#[repr(C)] -pub struct zx_info_header_t { - pub topic: u32, // identifies the info struct - pub avail_topic_size: u16, // “native” size of the struct - pub topic_size: u16, // size of the returned struct (<=topic_size) - pub avail_count: u32, // number of records the kernel has - pub count: u32, // number of records returned (limited by buffer size) -} - -#[derive(Default)] -#[repr(C)] -pub struct zx_record_process_t { - pub return_code: c_int, -} - // Returned for topic ZX_INFO_PROCESS #[derive(Default)] #[repr(C)] pub struct zx_info_process_t { - pub hdr: zx_info_header_t, - pub rec: zx_record_process_t, + pub return_code: i64, + pub started: bool, + pub exited: bool, + pub debugger_attached: bool, } extern { |
