summaryrefslogtreecommitdiff
path: root/tests/specs/node/child_process_extra_pipes/test-pipe/src/main.rs
blob: 192f8273132a88df22620ff94dc0c1c60c9e722c (plain)
1
2
3
4
5
6
7
8
9
10
11
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();
  }
}