about summary refs log tree commit diff
path: root/library
diff options
context:
space:
mode:
authorThom Chiovoloni <thom@shift.click>2023-06-04 10:13:16 -0700
committerThom Chiovoloni <thom@shift.click>2023-06-21 14:59:40 -0700
commit5ef4d1fb2e39f835307c40d4cde45409e22d5750 (patch)
treec3b72a6a91a606210ba9fb14a0cca4e3f6372dd7 /library
parenta7ecc71a48be74882d2b159876911e6b9edb945d (diff)
downloadrust-5ef4d1fb2e39f835307c40d4cde45409e22d5750.tar.gz
rust-5ef4d1fb2e39f835307c40d4cde45409e22d5750.zip
Actually save all the files
Diffstat (limited to 'library')
-rw-r--r--library/std/src/sys/unix/process/process_unix.rs13
1 files changed, 6 insertions, 7 deletions
diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs
index 98564c11673..129e7643661 100644
--- a/library/std/src/sys/unix/process/process_unix.rs
+++ b/library/std/src/sys/unix/process/process_unix.rs
@@ -172,13 +172,12 @@ impl Command {
         crate::sys_common::process::wait_with_output(proc, pipes)
     }
 
-    // WatchOS and TVOS can theoretically spawn processes using `posix_spawn*`
-    // (although it just fails with a runtime error AFAICT, so we don't yet
-    // support it in `std`), but forbid use of `fork`/`exec*`. It's unclear the
-    // extent to which these is restricted, but the headers say
-    // `__WATCHOS_PROHIBITED __TVOS_PROHIBITED`, so we go out of our way to
-    // avoid containing any calls to them at all, to avoid linking against their
-    // symbols on those targets.
+    // WatchOS and TVOS headers mark the `fork`/`exec*` functions with
+    // `__WATCHOS_PROHIBITED __TVOS_PROHIBITED`, and indicate that the
+    // `posix_spawn*` functions should be used instead. It isn't entirely clear
+    // what `PROHIBITED` means here (e.g. if calls to these functions are
+    // allowed to exist in dead code), but it sounds bad, so we go out of our
+    // way to avoid that all-together.
     #[cfg(any(target_os = "tvos", target_os = "watchos"))]
     const ERR_APPLE_TV_WATCH_NO_FORK_EXEC: Error = io::const_io_error!(
         ErrorKind::Unsupported,