about summary refs log tree commit diff
path: root/library/std/src/sys/process
diff options
context:
space:
mode:
authorjoboet <jonasboettiger@icloud.com>2025-05-05 12:16:40 +0200
committerjoboet <jonasboettiger@icloud.com>2025-05-05 12:16:40 +0200
commit7845c011dd3bdfb5eaa461476f5f7d0f3aa16dfc (patch)
tree8d1ea8f4d96fa08e3442e2cbbd68fef183fe521e /library/std/src/sys/process
parent54d024e4bf462c77a86c4126d7e66d89b64f053a (diff)
downloadrust-7845c011dd3bdfb5eaa461476f5f7d0f3aa16dfc.tar.gz
rust-7845c011dd3bdfb5eaa461476f5f7d0f3aa16dfc.zip
collect all Fuchsia bindings into the `fuchsia` module
The Fuchsia bindings are currently spread out across multiple modules in `sys/pal/unix` leading to unnecessary duplication. This PR moves all of these definitions into `sys::pal::unix::fuchsia` and additionally:
* deduplicates the definitions
* makes the error names consistent
* marks some extern functions as safe
* removes unused items (there's no need to maintain these bindings if we're not going to use them)
* removes the documentation for the definitions (contributors should always consult the platform documentation, duplicating that here is just an extra maintenance burden)
Diffstat (limited to 'library/std/src/sys/process')
-rw-r--r--library/std/src/sys/process/unix/fuchsia.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/sys/process/unix/fuchsia.rs b/library/std/src/sys/process/unix/fuchsia.rs
index 0de32ecffd4..eb62bbd808e 100644
--- a/library/std/src/sys/process/unix/fuchsia.rs
+++ b/library/std/src/sys/process/unix/fuchsia.rs
@@ -81,7 +81,7 @@ impl Command {
 
                 let mut handle = ZX_HANDLE_INVALID;
                 let status = fdio_fd_clone(target_fd, &mut handle);
-                if status == ERR_INVALID_ARGS || status == ERR_NOT_SUPPORTED {
+                if status == ZX_ERR_INVALID_ARGS || status == ZX_ERR_NOT_SUPPORTED {
                     // This descriptor is closed; skip it rather than generating an
                     // error.
                     return Ok(Default::default());
@@ -197,7 +197,7 @@ impl Process {
                 zx_object_wait_one(self.handle.raw(), ZX_TASK_TERMINATED, 0, ptr::null_mut());
             match status {
                 0 => {} // Success
-                x if x == ERR_TIMED_OUT => {
+                x if x == ZX_ERR_TIMED_OUT => {
                     return Ok(None);
                 }
                 _ => {