summaryrefslogtreecommitdiff
path: root/tests/specs/node/child_process_extra_pipes/test-pipe
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-08-15 09:38:46 -0700
committerGitHub <noreply@github.com>2024-08-15 09:38:46 -0700
commit8749d651fb5e0964cdb8e62be7a59a603cbc3c7c (patch)
tree1506d08504561a4013ad03ff1068bec23e572102 /tests/specs/node/child_process_extra_pipes/test-pipe
parent7ca95fc999f22cb0eb312e02f8c40d7589b35b7e (diff)
fix(node): Create additional pipes for child processes (#25016)
Linux/macos only currently. Part of https://github.com/denoland/deno/issues/23524 (fixes it on platforms other than windows). Part of #16899 (fixes it on platforms other than windows). After this PR, playwright is functional on mac/linux.
Diffstat (limited to 'tests/specs/node/child_process_extra_pipes/test-pipe')
-rw-r--r--tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.lock7
-rw-r--r--tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.toml8
-rw-r--r--tests/specs/node/child_process_extra_pipes/test-pipe/src/main.rs12
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.lock b/tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.lock
new file mode 100644
index 000000000..51bfabdad
--- /dev/null
+++ b/tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.lock
@@ -0,0 +1,7 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 3
+
+[[package]]
+name = "test-pipe"
+version = "0.1.0"
diff --git a/tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.toml b/tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.toml
new file mode 100644
index 000000000..26c552299
--- /dev/null
+++ b/tests/specs/node/child_process_extra_pipes/test-pipe/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "test-pipe"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+
+[workspace]
diff --git a/tests/specs/node/child_process_extra_pipes/test-pipe/src/main.rs b/tests/specs/node/child_process_extra_pipes/test-pipe/src/main.rs
new file mode 100644
index 000000000..192f82731
--- /dev/null
+++ b/tests/specs/node/child_process_extra_pipes/test-pipe/src/main.rs
@@ -0,0 +1,12 @@
+use std::io::prelude::*;
+use std::os::fd::FromRawFd;
+use std::os::unix::net::UnixStream;
+
+fn main() {
+ #[cfg(unix)]
+ {
+ let mut stream = unsafe { UnixStream::from_raw_fd(4) };
+
+ stream.write_all(b"hello world\n").unwrap();
+ }
+}