Searched refs:oldfd (Results 1 - 10 of 10) sorted by relevance

/haiku-fatelf/src/bin/findutils/gnulib/lib/
H A Dfchdir.c185 rpl_dup (int oldfd) argument
188 int newfd = dup (oldfd);
190 if (oldfd >= 0 && newfd >= 0)
195 if (oldfd < dirs_allocated)
197 if (dirs[oldfd].name != NULL)
199 dirs[newfd].name = strdup (dirs[oldfd].name);
206 dirs[newfd].saved_errno = dirs[oldfd].saved_errno;
220 rpl_dup2 (int oldfd, int newfd) argument
223 int retval = dup2 (oldfd, newfd);
225 if (retval >= 0 && oldfd >
[all...]
H A Dunistd.h79 extern int dup2 (int oldfd, int newfd);
H A Dunistd.in.h78 extern int dup2 (int oldfd, int newfd);
/haiku-fatelf/src/bin/coreutils/lib/
H A Dfchdir.c173 _gl_register_dup (int oldfd, int newfd) argument
175 assert (0 <= oldfd && 0 <= newfd && oldfd != newfd);
176 if (oldfd < dirs_allocated && dirs[oldfd].name)
180 || (dirs[newfd].name = strdup (dirs[oldfd].name)) == NULL)
269 rpl_dup (int oldfd) argument
272 int newfd = dup (oldfd);
275 newfd = _gl_register_dup (oldfd, newfd);
H A Dfcntl.c47 dupfd (int oldfd, int newfd, int flags) argument
52 HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
65 || (mode = setmode (oldfd, O_BINARY)) == -1)
67 /* oldfd is not open, or is an unassigned standard file
72 setmode (oldfd, mode);
140 result = _gl_register_dup (oldfd, result);
H A Dunistd.in.h213 extern int dup2 (int oldfd, int newfd);
236 extern int dup3 (int oldfd, int newfd, int flags);
314 extern int _gl_register_dup (int oldfd, int newfd);
/haiku-fatelf/src/tools/fs_shell/
H A Dfd.cpp301 * fcntl(oldfd, F_DUPFD, newfd);
307 dup2_fd(int oldfd, int newfd, bool kernel) argument
312 TRACE(("dup2_fd: ofd = %d, nfd = %d\n", oldfd, newfd));
315 if (oldfd < 0 || newfd < 0)
324 if ((uint32_t)oldfd >= context->table_size
326 || context->fds[oldfd] == NULL) {
334 if (oldfd != newfd) {
337 fssh_atomic_add(&context->fds[oldfd]->ref_count, 1);
338 fssh_atomic_add(&context->fds[oldfd]->open_count, 1);
339 context->fds[newfd] = context->fds[oldfd];
[all...]
/haiku-fatelf/src/system/kernel/fs/
H A Dfd.cpp405 fcntl(oldfd, F_DUPFD, newfd);
410 dup2_fd(int oldfd, int newfd, bool kernel) argument
415 TRACE(("dup2_fd: ofd = %d, nfd = %d\n", oldfd, newfd));
418 if (oldfd < 0 || newfd < 0)
427 if ((uint32)oldfd >= context->table_size
429 || context->fds[oldfd] == NULL) {
438 if (oldfd != newfd) {
440 TFD(Dup2FD(context, oldfd, newfd));
445 atomic_add(&context->fds[oldfd]->ref_count, 1);
446 atomic_add(&context->fds[oldfd]
[all...]
/haiku-fatelf/src/bin/network/wget/lib/
H A Dunistd.in.h170 extern int dup2 (int oldfd, int newfd);
193 extern int dup3 (int oldfd, int newfd, int flags);
254 extern int _gl_register_dup (int oldfd, int newfd);
/haiku-fatelf/src/bin/coreutils/src/
H A Dsort.c855 dup2_or_die (int oldfd, int newfd) argument
857 if (dup2 (oldfd, newfd) < 0)

Completed in 81 milliseconds