Home
last modified time | relevance | path

Searched refs:dup2 (Results 1 - 25 of 215) sorted by relevance

123456789

/third_party/musl/src/misc/
H A Dlogin_tty.c9 dup2(fd, 0); in login_tty()
10 dup2(fd, 1); in login_tty()
11 dup2(fd, 2); in login_tty()
/kernel/linux/linux-5.10/tools/lib/subcmd/
H A Drun-command.c25 dup2(fd, to); in dup_devnull()
86 dup2(fdin[0], 0); in start_command()
89 dup2(cmd->in, 0); in start_command()
96 dup2(fderr[1], 2); in start_command()
103 dup2(2, 1); in start_command()
105 dup2(fdout[1], 1); in start_command()
108 dup2(cmd->out, 1); in start_command()
/kernel/linux/linux-6.6/tools/lib/subcmd/
H A Drun-command.c25 dup2(fd, to); in dup_devnull()
86 dup2(fdin[0], 0); in start_command()
89 dup2(cmd->in, 0); in start_command()
96 dup2(fderr[1], 2); in start_command()
103 dup2(2, 1); in start_command()
105 dup2(fdout[1], 1); in start_command()
108 dup2(cmd->out, 1); in start_command()
/third_party/musl/src/legacy/
H A Ddaemon.c14 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 Ddaemon.c14 if (dup2(fd, 0) < 0 || dup2(fd, 1) < 0 || dup2(fd, 2) < 0) in daemon()
/third_party/rust/crates/rustix/examples/
H A Ddup2_to_replace_stdio.rs1 //! 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 Dgoogletest.cc59 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/ntfs-3g/libntfs-3g/
H A Dcompat.c142 (void)dup2(fd, 0); in daemon()
143 (void)dup2(fd, 1); in daemon()
144 (void)dup2(fd, 2); in daemon()
/third_party/node/tools/
H A Dpseudo-tty.py73 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/alsa-utils/alsactl/
H A Dinit_utils_run.c104 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 Dsulogin.c91 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 Dinit.c60 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()
/kernel/linux/linux-5.10/arch/um/drivers/
H A Dport_user.c158 dup2(data->sock_fd, 0); in port_pre_exec()
159 dup2(data->sock_fd, 1); in port_pre_exec()
160 dup2(data->sock_fd, 2); in port_pre_exec()
162 dup2(data->pipe_fd, 3); in port_pre_exec()
H A Dharddog_user.c21 dup2(data->stdin_fd, 0); in pre_exec()
22 dup2(data->stdout_fd, 1); in pre_exec()
23 dup2(data->stdout_fd, 2); in pre_exec()
/kernel/linux/linux-6.6/arch/um/drivers/
H A Dport_user.c159 dup2(data->sock_fd, 0); in port_pre_exec()
160 dup2(data->sock_fd, 1); in port_pre_exec()
161 dup2(data->sock_fd, 2); in port_pre_exec()
163 dup2(data->pipe_fd, 3); in port_pre_exec()
H A Dharddog_user.c22 dup2(data->stdin_fd, 0); in pre_exec()
23 dup2(data->stdout_fd, 1); in pre_exec()
24 dup2(data->stdout_fd, 2); in pre_exec()
/third_party/skia/third_party/externals/microhttpd/src/testspdy/
H A Dtest_proxies.c115 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 Dtest_session_timeout.c284 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 Dstdio_gets_test.cpp29 dup2(fd, STDIN_FILENO); in HWTEST_F()
32 dup2(orgFd, STDIN_FILENO); in HWTEST_F()
H A Dstdio_getwchar_test.cpp27 dup2(fd, STDIN_FILENO); in HWTEST_F()
30 dup2(orgFd, STDIN_FILENO); in HWTEST_F()
/third_party/mesa3d/src/freedreno/decode/
H A Dpager.c63 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 Dunistd_dup2_test.cpp15 * @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 Ddup.rs36 /// `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 Dtrerrno.c52 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 Ducm_exec.c251 dup2(f, 0); in uc_mgr_exec()
252 dup2(f, 1); in uc_mgr_exec()
253 dup2(f, 2); in uc_mgr_exec()

Completed in 8 milliseconds

123456789