Home
last modified time | relevance | path

Searched refs:fcntl (Results 1 – 25 of 198) sorted by relevance

12345678

/dragonfly/contrib/diffutils/lib/
H A Dfcntl.c201 fcntl (int fd, int action, /* arg */...) in fcntl() function
202 #undef fcntl in fcntl()
204 # define fcntl klibc_fcntl in fcntl() macro
327 result = fcntl (fd, action); in fcntl()
423 result = fcntl (fd, action, x); in fcntl()
431 result = fcntl (fd, action, p); in fcntl()
461 int flags = fcntl (fd, F_GETFD); in rpl_fcntl_DUPFD()
481 result = fcntl (fd, F_DUPFD, target); in rpl_fcntl_DUPFD()
530 int flags = fcntl (result, F_GETFD); in rpl_fcntl_DUPFD_CLOEXEC()
543 #undef fcntl
[all …]
H A Dcloexec.c43 int flags = fcntl (desc, F_GETFD, 0); in set_cloexec_flag()
50 || fcntl (desc, F_SETFD, newflags) != -1) in set_cloexec_flag()
82 return fcntl (fd, F_DUPFD_CLOEXEC, 0); in dup_cloexec()
H A Ddup2.c178 return fcntl (fd, F_GETFL) == -1 ? -1 : fd; in rpl_dup2()
218 int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; in dup2()
223 result = fcntl (fd, F_DUPFD, desired_fd); in dup2()
/dragonfly/contrib/grep/lib/
H A Dfcntl.c202 fcntl (int fd, int action, /* arg */...) in fcntl() function
203 #undef fcntl in fcntl()
205 # define fcntl klibc_fcntl in fcntl() macro
328 result = fcntl (fd, action); in fcntl()
424 result = fcntl (fd, action, x); in fcntl()
432 result = fcntl (fd, action, p); in fcntl()
462 int flags = fcntl (fd, F_GETFD); in rpl_fcntl_DUPFD()
482 result = fcntl (fd, F_DUPFD, target); in rpl_fcntl_DUPFD()
531 int flags = fcntl (result, F_GETFD); in rpl_fcntl_DUPFD_CLOEXEC()
544 #undef fcntl
[all …]
H A Dcloexec.c43 int flags = fcntl (desc, F_GETFD, 0); in set_cloexec_flag()
50 || fcntl (desc, F_SETFD, newflags) != -1) in set_cloexec_flag()
82 return fcntl (fd, F_DUPFD_CLOEXEC, 0); in dup_cloexec()
H A Ddup2.c178 return fcntl (fd, F_GETFL) == -1 ? -1 : fd; in rpl_dup2()
218 int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; in dup2()
223 result = fcntl (fd, F_DUPFD, desired_fd); in dup2()
/dragonfly/gnu/usr.bin/diff/libdiffutils/
H A Dfcntl.h41 #include_next <fcntl.h>
61 #include_next <fcntl.h>
562 # undef fcntl
563 # define fcntl rpl_fcntl macro
565 _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
566 _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
569 _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
571 _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
573 _GL_CXXALIASWARN (fcntl);
575 # undef fcntl
[all …]
/dragonfly/gnu/usr.bin/grep/libgreputils/
H A Dfcntl.h41 #include_next <fcntl.h>
67 #include_next <fcntl.h>
588 # undef fcntl
589 # define fcntl rpl_fcntl macro
591 _GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...));
592 _GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...));
595 _GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...));
597 _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
599 _GL_CXXALIASWARN (fcntl);
601 # undef fcntl
[all …]
/dragonfly/test/debug/
H A Dposixlock.c74 while ((r = fcntl(fd, F_GETLK, &lk)) == 0) { in main()
97 if (fcntl(fd, F_SETLKW, &lk) == 0) { in main()
105 if (fcntl(fd, F_SETLKW, &lk) == 0) { in main()
113 if (fcntl(fd, F_SETLKW, &lk) == 0) { in main()
/dragonfly/crypto/libressl/crypto/bio/
H A Db_posix.c84 int flags = fcntl(s, F_GETFD); in BIO_socket_nbio()
86 return (fcntl(s, F_SETFL, flags | O_NONBLOCK) != -1); in BIO_socket_nbio()
88 return (fcntl(s, F_SETFL, flags & ~O_NONBLOCK) != -1); in BIO_socket_nbio()
/dragonfly/sbin/udevd/
H A Dudevd_socket.c114 flags = fcntl(s, F_GETFL, 0); in unblock_descriptor()
115 ret = fcntl(s, F_SETFL, flags | O_NONBLOCK); in unblock_descriptor()
124 flags = fcntl(s, F_GETFL, 0); in block_descriptor()
125 ret = fcntl(s, F_SETFL, flags & ~O_NONBLOCK); in block_descriptor()
/dragonfly/usr.sbin/ppp/
H A Dprompt.c421 stat = fcntl(fd, F_GETFL, 0); in prompt_TtyInit()
424 fcntl(fd, F_SETFL, stat); in prompt_TtyInit()
460 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyCommandMode()
463 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyCommandMode()
480 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyTermMode()
483 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyTermMode()
493 stat = fcntl(p->fd_in, F_GETFL, 0); in prompt_TtyOldMode()
496 fcntl(p->fd_in, F_SETFL, stat); in prompt_TtyOldMode()
/dragonfly/contrib/dhcpcd/src/
H A Dif.c992 if ((xtype & SOCK_CLOEXEC) && ((xflags = fcntl(s, F_GETFD)) == -1 || in xsocket()
993 fcntl(s, F_SETFD, xflags | FD_CLOEXEC) == -1)) in xsocket()
997 if ((xtype & SOCK_NONBLOCK) && ((xflags = fcntl(s, F_GETFL)) == -1 || in xsocket()
998 fcntl(s, F_SETFL, xflags | O_NONBLOCK) == -1)) in xsocket()
1036 if ((xtype & SOCK_CLOEXEC) && ((xflags = fcntl(fd[0], F_GETFD)) == -1 || in xsocketpair()
1037 fcntl(fd[0], F_SETFD, xflags | FD_CLOEXEC) == -1)) in xsocketpair()
1039 if ((xtype & SOCK_CLOEXEC) && ((xflags = fcntl(fd[1], F_GETFD)) == -1 || in xsocketpair()
1040 fcntl(fd[1], F_SETFD, xflags | FD_CLOEXEC) == -1)) in xsocketpair()
1044 if ((xtype & SOCK_NONBLOCK) && ((xflags = fcntl(fd[0], F_GETFL)) == -1 || in xsocketpair()
1045 fcntl(fd[0], F_SETFL, xflags | O_NONBLOCK) == -1)) in xsocketpair()
[all …]
/dragonfly/bin/sh/
H A Dredir.c146 if ((i = fcntl(fd, F_DUPFD_CLOEXEC_MAYBE, 10)) == -1) { in redirect()
159 fcntl(i, F_SETFD, FD_CLOEXEC); in redirect()
285 flags = fcntl(pip[1], F_GETFL, 0); in openhere()
286 if (flags != -1 && fcntl(pip[1], F_SETFL, flags | O_NONBLOCK) != -1) { in openhere()
292 fcntl(pip[1], F_SETFL, flags); in openhere()
/dragonfly/contrib/binutils-2.34/libiberty/
H A Dpex-unix.c382 flags = fcntl (old_fd, F_GETFD); in save_and_install_fd()
395 if ((flags & FD_CLOEXEC) == 0 && fcntl (old_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
402 new_fd = fcntl (old_fd, F_DUPFD_CLOEXEC, 3); in save_and_install_fd()
408 new_fd = fcntl (old_fd, F_DUPFD, 3); in save_and_install_fd()
411 if (fcntl (new_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
444 return fcntl (old_fd, F_SETFD, flags); in restore_fd()
460 if (flags != 0 && fcntl (old_fd, F_SETFD, flags) < 0) in restore_fd()
595 if (fcntl (pipes[1], F_SETFD, FD_CLOEXEC) == -1) in pex_unix_exec_child()
811 if (fcntl (fd, F_SETFD, FD_CLOEXEC) < 0) in pex_unix_fdopenw()
/dragonfly/contrib/binutils-2.27/libiberty/
H A Dpex-unix.c407 flags = fcntl (old_fd, F_GETFD); in save_and_install_fd()
420 if ((flags & FD_CLOEXEC) == 0 && fcntl (old_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
427 new_fd = fcntl (old_fd, F_DUPFD_CLOEXEC, 3); in save_and_install_fd()
433 new_fd = fcntl (old_fd, F_DUPFD, 3); in save_and_install_fd()
436 if (fcntl (new_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
469 return fcntl (old_fd, F_SETFD, flags); in restore_fd()
485 if (flags != 0 && fcntl (old_fd, F_SETFD, flags) < 0) in restore_fd()
770 if (fcntl (fd, F_SETFD, FD_CLOEXEC) < 0) in pex_unix_fdopenw()
/dragonfly/contrib/gdb-7/libiberty/
H A Dpex-unix.c407 flags = fcntl (old_fd, F_GETFD); in save_and_install_fd()
420 if ((flags & FD_CLOEXEC) == 0 && fcntl (old_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
427 new_fd = fcntl (old_fd, F_DUPFD_CLOEXEC, 3); in save_and_install_fd()
433 new_fd = fcntl (old_fd, F_DUPFD, 3); in save_and_install_fd()
436 if (fcntl (new_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
469 return fcntl (old_fd, F_SETFD, flags); in restore_fd()
485 if (flags != 0 && fcntl (old_fd, F_SETFD, flags) < 0) in restore_fd()
770 if (fcntl (fd, F_SETFD, FD_CLOEXEC) < 0) in pex_unix_fdopenw()
/dragonfly/contrib/gcc-4.7/libiberty/
H A Dpex-unix.c405 flags = fcntl (old_fd, F_GETFD); in save_and_install_fd()
418 if ((flags & FD_CLOEXEC) == 0 && fcntl (old_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
425 new_fd = fcntl (old_fd, F_DUPFD_CLOEXEC, 3); in save_and_install_fd()
431 new_fd = fcntl (old_fd, F_DUPFD, 3); in save_and_install_fd()
434 if (fcntl (new_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
467 return fcntl (old_fd, F_SETFD, flags); in restore_fd()
483 if (flags != 0 && fcntl (old_fd, F_SETFD, flags) < 0) in restore_fd()
768 if (fcntl (fd, F_SETFD, FD_CLOEXEC) < 0) in pex_unix_fdopenw()
/dragonfly/contrib/gcc-8.0/libiberty/
H A Dpex-unix.c406 flags = fcntl (old_fd, F_GETFD); in save_and_install_fd()
419 if ((flags & FD_CLOEXEC) == 0 && fcntl (old_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
426 new_fd = fcntl (old_fd, F_DUPFD_CLOEXEC, 3); in save_and_install_fd()
432 new_fd = fcntl (old_fd, F_DUPFD, 3); in save_and_install_fd()
435 if (fcntl (new_fd, F_SETFD, FD_CLOEXEC) < 0) in save_and_install_fd()
468 return fcntl (old_fd, F_SETFD, flags); in restore_fd()
484 if (flags != 0 && fcntl (old_fd, F_SETFD, flags) < 0) in restore_fd()
769 if (fcntl (fd, F_SETFD, FD_CLOEXEC) < 0) in pex_unix_fdopenw()
/dragonfly/contrib/gdb-7/gdb/
H A Dinflow.c181 our_terminal_info.tflags = fcntl (0, F_GETFL, 0); in gdb_has_a_terminal()
293 result = fcntl (0, F_SETFL, tinfo->tflags); in terminal_inferior()
294 result = fcntl (0, F_SETFL, tinfo->tflags); in terminal_inferior()
470 tinfo->tflags = fcntl (0, F_GETFL, 0); in terminal_ours_1()
475 result = fcntl (0, F_SETFL, our_terminal_info.tflags); in terminal_ours_1()
476 result = fcntl (0, F_SETFL, our_terminal_info.tflags); in terminal_ours_1()
/dragonfly/contrib/xz/src/xz/
H A Dfile_io.c115 int flags = fcntl(user_abort_pipe[i], F_GETFL); in io_init()
116 if (flags == -1 || fcntl(user_abort_pipe[i], F_SETFL, in io_init()
515 stdin_flags = fcntl(STDIN_FILENO, F_GETFL); in io_open_src_real()
524 && fcntl(STDIN_FILENO, F_SETFL, in io_open_src_real()
791 if (fcntl(STDIN_FILENO, F_SETFL, stdin_flags) == -1) in io_close_src()
838 stdout_flags = fcntl(STDOUT_FILENO, F_GETFL); in io_open_dest_real()
847 && fcntl(STDOUT_FILENO, F_SETFL, in io_open_dest_real()
964 if (fcntl(STDOUT_FILENO, F_SETFL, flags) == -1) in io_open_dest_real()
1017 if (fcntl(STDOUT_FILENO, F_SETFL, stdout_flags) == -1) { in io_close_dest()
/dragonfly/lib/libc/sysvipc/
H A Dsockets.c96 flags = fcntl(fd, F_GETFL, 0); in handle_new_connection()
97 fcntl(fd, F_SETFL, flags & ~O_NONBLOCK); in handle_new_connection()
113 flags = fcntl(sock, F_GETFL, 0); in connect_to_daemon()
114 fcntl(sock, F_SETFL, flags & ~O_NONBLOCK); in connect_to_daemon()
/dragonfly/contrib/binutils-2.27/gold/
H A Dftruncate.c38 return fcntl (fd, F_CHSIZE, length); in ftruncate()
82 if (fcntl (fd, F_FREESP, &fl) < 0) in ftruncate()
/dragonfly/contrib/lvm2/dist/lib/misc/
H A Dlvm-file.c69 if (!fcntl(*fd, F_SETLK, &lock)) in create_temp_name()
249 if (fcntl(lockfd, F_SETLKW, &lock)) { in fcntl_lock_file()
269 if (fcntl(lockfd, F_SETLK, &lock) == -1) in fcntl_unlock_file()
/dragonfly/usr.bin/mail/
H A Dpopen.c69 fcntl(fileno(fp), F_SETFD, 1); in Fopen()
81 fcntl(fileno(fp), F_SETFD, 1); in Fdopen()
104 fcntl(p[READ], F_SETFD, 1); in Popen()
105 fcntl(p[WRITE], F_SETFD, 1); in Popen()

12345678