/third_party/musl/src/misc/ |
H A D | login_tty.c | 9 dup2(fd, 0); in login_tty() 10 dup2(fd, 1); in login_tty() 11 dup2(fd, 2); in login_tty()
|
/third_party/musl/src/legacy/ |
H A D | daemon.c | 14 if (dup2(fd, 0) < 0 || dup2(fd, 1) < 0 || dup2(fd, 2) < 0) in daemon()
|
/third_party/musl/porting/liteos_a/user/src/legacy/ |
H A D | daemon.c | 14 if (dup2(fd, 0) < 0 || dup2(fd, 1) < 0 || dup2(fd, 2) < 0) in daemon()
|
/third_party/rust/crates/rustix/examples/ |
H A D | dup2_to_replace_stdio.rs | 1 //! This is an example of how to use `dup2` to replace the stdin and stdout 6 use rustix::io::{dup2, pipe}; in main() 21 // Use `dup2` to copy our new file descriptors over the stdio file descriptors. in main() 27 dup2(&reader, &mut stdin).unwrap(); in main() 28 dup2(&writer, &mut stdout).unwrap(); in main() 36 // We can also drop the original file descriptors now, since `dup2` creates in main()
|
/third_party/protobuf/src/google/protobuf/testing/ |
H A D | googletest.cc | 59 using google::protobuf::io::win32::dup2; 211 dup2(fd, 1); in CaptureTestStdout() 226 dup2(fd, 2); in CaptureTestStderr() 234 dup2(original_stdout_, 1); in GetCapturedTestStdout() 249 dup2(original_stderr_, 2); in GetCapturedTestStderr()
|
/third_party/node/tools/ |
H A D | pseudo-tty.py | 73 os.dup2(fd, child_fd) 76 os.dup2(child_fd, STDIN) 77 os.dup2(child_fd, STDOUT) 78 os.dup2(child_fd, STDERR)
|
/third_party/ntfs-3g/libntfs-3g/ |
H A D | compat.c | 142 (void)dup2(fd, 0); in daemon() 143 (void)dup2(fd, 1); in daemon() 144 (void)dup2(fd, 2); in daemon()
|
/third_party/alsa-utils/alsactl/ |
H A D | init_utils_run.c | 104 dup2(devnull, STDIN_FILENO); in run_program0() 106 dup2(devnull, STDOUT_FILENO); in run_program0() 108 dup2(devnull, STDERR_FILENO); in run_program0() 113 dup2(outpipe[WRITE_END], STDOUT_FILENO); in run_program0() 117 dup2(errpipe[WRITE_END], STDERR_FILENO); in run_program0()
|
/third_party/toybox/toys/pending/ |
H A D | sulogin.c | 91 dup2((fd = xopen_stdio(toys.optargs[0], O_RDWR)), 0); in sulogin_main() 93 dup2( fd, 1); in sulogin_main() 94 dup2( fd, 2); in sulogin_main()
|
H A D | init.c | 60 dup2(fd,0); in initialize_console() 61 dup2(fd,1); in initialize_console() 62 dup2(fd,2); in initialize_console() 276 dup2(0, 1); in final_run() 277 dup2(0, 2); in final_run() 405 dup2(0, 1); in restart_init_handler() 406 dup2(0, 2); in restart_init_handler()
|
/third_party/skia/third_party/externals/microhttpd/src/testspdy/ |
H A D | test_proxies.c | 115 dup2(devnull, 1); in main() 140 dup2(devnull, 1); in main() 166 dup2(devnull, 1); in main() 195 dup2(devnull, 1); in main()
|
H A D | test_session_timeout.c | 284 dup2(devnull, 0); in childproc() 292 dup2(devnull, 1); in childproc() 300 dup2(devnull, 2); in childproc() 307 dup2(out,1); in childproc()
|
/third_party/musl/libc-test/src/functionalext/supplement/stdio/stdio_gtest/ |
H A D | stdio_gets_test.cpp | 29 dup2(fd, STDIN_FILENO); in HWTEST_F() 32 dup2(orgFd, STDIN_FILENO); in HWTEST_F()
|
H A D | stdio_getwchar_test.cpp | 27 dup2(fd, STDIN_FILENO); in HWTEST_F() 30 dup2(orgFd, STDIN_FILENO); in HWTEST_F()
|
/third_party/mesa3d/src/freedreno/decode/ |
H A D | pager.c | 63 dup2(fd[0], STDIN_FILENO); in pager_open() 75 dup2(fd[1], STDOUT_FILENO); in pager_open()
|
/third_party/musl/libc-test/src/functionalext/supplement/unistd/unistd_gtest/ |
H A D | unistd_dup2_test.cpp | 15 * @tc.desc: Verify the functionality of the dup2() function by duplicating a file descriptor onto another, 28 int result2 = dup2(fd, fileno(fp)); in HWTEST_F() 36 * @tc.desc: Verify the error handling of the dup2() function when invalid file descriptors are provided as arguments. 42 int result = dup2(-1, -1); in HWTEST_F()
|
/third_party/rust/crates/rustix/src/io/ |
H A D | dup.rs | 36 /// `dup2(fd, new)`—Changes the [file description] of a file descriptor. 38 /// `dup2` conceptually closes `new` and then sets the file description for 43 /// This function does not set the `O_CLOEXEC` flag. To do a `dup2` that does 54 /// [POSIX]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/dup2.html 55 /// [Linux]: https://man7.org/linux/man-pages/man2/dup2.2.html 56 /// [Apple]: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/dup2.2.html 59 pub fn dup2<Fd: AsFd>(fd: Fd, new: &mut OwnedFd) -> io::Result<()> { in dup2() functions 60 backend::io::syscalls::dup2(fd.as_fd(), new) in dup2() 66 /// `dup3` is the same as [`dup2`] but adds an additional flags operand, and it
|
/third_party/ltp/lib/tests/ |
H A D | trerrno.c | 52 TEST(dup2(fd, fileno(stdout))); in main() 54 tst_brkm(TBROK | TTERRNO, cleanup, "dup2"); in main() 63 TEST(dup2(stdout_fd, fileno(stdout))); in main() 65 tst_brkm(TBROK | TTERRNO, cleanup, "dup2"); in main()
|
/third_party/alsa-lib/src/ucm/ |
H A D | ucm_exec.c | 251 dup2(f, 0); in uc_mgr_exec() 252 dup2(f, 1); in uc_mgr_exec() 253 dup2(f, 2); in uc_mgr_exec()
|
/third_party/skia/third_party/externals/angle2/src/tests/test_utils/runner/android/ |
H A D | AngleNativeTest.cpp | 162 int retVal = dup2(fileno(stdoutFile), STDOUT_FILENO); in Java_com_android_angle_test_AngleNativeTest_nativeRunTests() 165 AndroidLog(ANDROID_LOG_ERROR, "Failed to dup2 stdout to file: %d\n", errno); in Java_com_android_angle_test_AngleNativeTest_nativeRunTests() 171 dup2(STDOUT_FILENO, STDERR_FILENO); in Java_com_android_angle_test_AngleNativeTest_nativeRunTests() 182 dup2(oldStdout, STDOUT_FILENO); in Java_com_android_angle_test_AngleNativeTest_nativeRunTests()
|
/third_party/skia/third_party/externals/tint/src/utils/io/ |
H A D | command_posix.cc | 240 if ((dup2(stdin_pipe.read, STDIN_FILENO) == -1) || in Exec() 241 (dup2(stdout_pipe.write, STDOUT_FILENO) == -1) || in Exec() 242 (dup2(stderr_pipe.write, STDERR_FILENO) == -1)) { in Exec()
|
/third_party/toybox/toys/net/ |
H A D | netcat.c | 184 dup2(in1, 0); in netcat_main() 185 dup2(in1, 1); in netcat_main() 186 if (FLAG(E)) dup2(in1, 2); in netcat_main()
|
/third_party/python/Lib/ |
H A D | pty.py | 109 os.dup2(slave_fd, STDIN_FILENO) 110 os.dup2(slave_fd, STDOUT_FILENO) 111 os.dup2(slave_fd, STDERR_FILENO)
|
/third_party/rust/crates/libc/src/unix/solarish/ |
H A D | compat.rs | 156 || ::dup2(fds, 0) < 0 in forkpty() 157 || ::dup2(fds, 1) < 0 in forkpty() 158 || ::dup2(fds, 2) < 0 in forkpty()
|
/third_party/skia/third_party/externals/sfntly/java/src/com/google/typography/font/tools/conversion/eot/ |
H A D | LzcompCompress.java | 48 private int dup2; field in LzcompCompress 86 dup2 = 256 + (1 << LEN_WIDTH) * numDistRanges; in setDistRange() 87 dup4 = dup2 + 1; in setDistRange() 111 symEncoder.writeSymbol(dup2); in encode() 183 int dup2Cost = symEncoder.writeSymbolCost(dup2); in makeCopyDecision() 188 int dup2Cost = symEncoder.writeSymbolCost(dup2); in makeCopyDecision()
|