about summary refs log tree commit diff
path: root/src/libstd/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/sys')
-rw-r--r--src/libstd/sys/unix/process/process_common.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/sys/unix/process/process_common.rs b/src/libstd/sys/unix/process/process_common.rs
index c53bcdbf8e3..b09fc36dee0 100644
--- a/src/libstd/sys/unix/process/process_common.rs
+++ b/src/libstd/sys/unix/process/process_common.rs
@@ -87,6 +87,11 @@ pub enum Stdio {
     Fd(FileDesc),
 }
 
+// Command is not Send by default due to the Command.argv field containing a raw pointers. However
+// it is safe to implement Send, because anyway, these pointers point to memory owned by the
+// Command.args field.
+unsafe impl Send for Command {}
+
 impl Command {
     pub fn new(program: &OsStr) -> Command {
         let mut saw_nul = false;