Defined in 4 files as a prototype:
Defined in 7 files as a macro:
Defined in 2 files as a function:
Referenced in 297 files:
- bin/cat/cat.c, line 129
- bin/csh/misc.c, line 236
- bin/dd/dd.c, line 103
- bin/dd/dd_hostops.c, line 45
- bin/ksh/exec.c, line 68
- bin/ksh/io.c, line 316
- bin/ksh/misc.c, 2 times
- bin/ksh/sh.h, line 94
- bin/ksh/shf.c, 2 times
- bin/sh/eval.c, 2 times
- bin/sh/input.c, 3 times
- bin/sh/main.c, line 136
- bin/sh/redir.c, 23 times
- crypto/dist/ipsec-tools/src/racoon/grabmyaddr.c, 2 times
- crypto/dist/ipsec-tools/src/racoon/isakmp.c, line 1628
- crypto/dist/ipsec-tools/src/racoon/misc.c, line 133
- crypto/dist/ipsec-tools/src/racoon/pfkey.c, line 447
- crypto/external/bsd/heimdal/dist/lib/ipc/server.c, 2 times
- crypto/external/bsd/heimdal/dist/lib/krb5/fcache.c, 2 times
- crypto/external/bsd/heimdal/dist/lib/roken/cloexec.c, 2 times
- crypto/external/bsd/heimdal/dist/lib/roken/flock.c, 3 times
- crypto/external/bsd/heimdal/dist/lib/roken/socket.c, 2 times
- crypto/external/bsd/openssh/dist/authfd.c, line 108
- crypto/external/bsd/openssh/dist/channels.c, 3 times
- crypto/external/bsd/openssh/dist/misc.c, 5 times
- crypto/external/bsd/openssh/dist/monitor.c, line 1707
- crypto/external/bsd/openssh/dist/serverloop.c, 2 times
- crypto/external/bsd/openssh/dist/ssh-agent.c, line 1326
- crypto/external/bsd/openssh/dist/sshconnect.c, line 392
- crypto/external/bsd/openssh/dist/sshconnect2.c, line 1897
- crypto/external/bsd/openssh/dist/sshd.c, 3 times
- crypto/external/bsd/openssl/dist/crypto/bio/b_sock.c, 2 times
- crypto/external/bsd/openssl/dist/crypto/bio/bss_dgram.c, 6 times
- crypto/external/bsd/openssl/dist/engines/e_afalg.c, line 176
- crypto/external/cpl/trousers/dist/src/tcs/ps/tcsps.c, 3 times
- crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c, 3 times
- dist/pf/usr.sbin/ftp-proxy/ftp-proxy.c, 2 times
- distrib/utils/libhack/opendir.c, line 71
- external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c, 4 times
- external/apache2/mDNSResponder/dist/mDNSShared/uds_daemon.c, 6 times
- external/apache2/mDNSResponder/nss/nss_mdnsd.c, line 1144
- external/bsd/am-utils/dist/amd/info_exec.c, 2 times
- external/bsd/am-utils/dist/amd/rpc_fwd.c, line 187
- external/bsd/am-utils/dist/conf/mtab/mtab_file.c, line 82
- external/bsd/am-utils/dist/conf/mtab/mtab_isc3.c, line 74
- external/bsd/am-utils/dist/conf/mtab/mtab_linux.c, 2 times
- external/bsd/am-utils/dist/conf/mtab/mtab_mach3.c, line 78
- external/bsd/am-utils/dist/conf/mtab/mtab_svr4.c, line 96
- external/bsd/blacklist/lib/bl.c, 3 times
- external/bsd/blacklist/port/popenve.c, 6 times
- external/bsd/cron/dist/closeall.c, line 14
- external/bsd/cron/dist/misc.c, 2 times
- external/bsd/dhcpcd/dist/src/bpf.c, 2 times
- external/bsd/dhcpcd/dist/src/control.c, 4 times
- external/bsd/dhcpcd/dist/src/eloop.c, 2 times
- external/bsd/dhcpcd/dist/src/if.c, 4 times
- external/bsd/file/dist/src/seccomp.c, line 172
- external/bsd/ipf/dist/ipsend/lsock.c, line 212
- external/bsd/ipf/dist/ipsend/sock.c, line 414
- external/bsd/ipf/dist/l4check/l4check.c, 2 times
- external/bsd/iscsi/dist/src/lib/util.c, 2 times
- external/bsd/jemalloc/dist/src/pages.c, 6 times
- external/bsd/libarchive/dist/libarchive/archive_read_disk_posix.c, line 2078
- external/bsd/libarchive/dist/libarchive/archive_read_support_filter_program.c, 2 times
- external/bsd/libarchive/dist/libarchive/archive_util.c, 2 times
- external/bsd/libarchive/dist/libarchive/archive_write_add_filter_program.c, 4 times
- external/bsd/libarchive/dist/libarchive/archive_write_disk_posix.c, line 3511
- external/bsd/libarchive/dist/libarchive/filter_fork_posix.c, 2 times
- external/bsd/libbind/dist/bsd/ftruncate.c, line 58
- external/bsd/libbind/dist/irs/irp.c, 2 times
- external/bsd/libbind/dist/irs/lcl_gr.c, line 225
- external/bsd/libbind/dist/irs/lcl_ho.c, line 440
- external/bsd/libbind/dist/irs/lcl_nw.c, line 215
- external/bsd/libbind/dist/irs/lcl_pr.c, line 193
- external/bsd/libbind/dist/irs/lcl_sv.c, 2 times
- external/bsd/libbind/dist/isc/ctl_srvr.c, 2 times
- external/bsd/libbind/dist/isc/ev_connects.c, 4 times
- external/bsd/libbind/dist/isc/ev_files.c, 4 times
- external/bsd/libevent/dist/evutil.c, 7 times
- external/bsd/libpcap/dist/pcap-linux.c, 4 times
- external/bsd/libpcap/dist/pcap.c, 3 times
- external/bsd/llvm/dist/clang/test/Sema/warn-type-safety.c, 9 times
- external/bsd/llvm/dist/llvm/utils/unittest/googletest/src/gtest-death-test.cc, 4 times
- external/bsd/nsd/dist/dnstap/dnstap_collector.c, 4 times
- external/bsd/nsd/dist/remote.c, 4 times
- external/bsd/nsd/dist/server.c, 7 times
- external/bsd/nsd/dist/xfrd-tcp.c, line 534
- external/bsd/ntp/dist/lib/isc/unix/entropy.c, 2 times
- external/bsd/ntp/dist/lib/isc/unix/socket.c, 5 times
- external/bsd/ntp/dist/libntp/iosignal.c, 6 times
- external/bsd/ntp/dist/libntp/machines.c, 2 times
- external/bsd/ntp/dist/libntp/ntp_worker.c, line 116
- external/bsd/ntp/dist/libntp/socket.c, 4 times
- external/bsd/ntp/dist/libntp/work_thread.c, 2 times
- external/bsd/ntp/dist/ntpd/ntp_io.c, line 3101
- external/bsd/ntp/dist/ntpd/refclock_arc.c, line 665
- external/bsd/ntp/dist/ntpd/refclock_datum.c, line 256
- external/bsd/ntp/dist/ntpd/refclock_gpsdjson.c, line 1880
- external/bsd/ntp/dist/ntpdate/ntpdate.c, 2 times
- external/bsd/ntp/dist/sntp/libevent/evutil.c, 7 times
- external/bsd/nvi/dist/common/exf.c, 2 times
- external/bsd/openldap/dist/contrib/slapd-modules/nssov/nssov.c, 3 times
- external/bsd/openldap/dist/libraries/liblber/sockbuf.c, 2 times
- external/bsd/openldap/dist/libraries/libldap/os-ip.c, line 122
- external/bsd/openldap/dist/libraries/libldap/os-local.c, line 101
- external/bsd/openldap/dist/libraries/libldap/tls_m.c, line 3031
- external/bsd/openldap/dist/libraries/liblmdb/mdb.c, 9 times
- external/bsd/openldap/dist/libraries/liblutil/lockf.c, 3 times
- external/bsd/openldap/dist/servers/slapd/alock.c, 8 times
- external/bsd/ppp/dist/chat/chat.c, 8 times
- external/bsd/ppp/dist/pppd/tty.c, 11 times
- external/bsd/ppp/usr.sbin/pppd/sys-bsd.c, 7 times
- external/bsd/ppp/usr.sbin/pppd/tdb.c, line 111
- external/bsd/tmux/dist/tmux.c, 2 times
- external/bsd/tmux/dist/tty.c, line 94
- external/bsd/unbound/dist/compat/arc4random.c, 2 times
- external/bsd/unbound/dist/compat/getentropy_linux.c, 2 times
- external/bsd/unbound/dist/compat/getentropy_osx.c, 2 times
- external/bsd/unbound/dist/compat/getentropy_solaris.c, 2 times
- external/bsd/unbound/dist/util/net_help.c, 4 times
- external/bsd/wpa/dist/src/common/wpa_ctrl.c, 2 times
- external/bsd/wpa/dist/src/drivers/driver_nl80211_android.c, line 187
- external/bsd/wpa/dist/src/drivers/rfkill.c, line 133
- external/bsd/wpa/dist/src/utils/os_unix.c, line 453
- external/bsd/wpa/dist/src/utils/wpa_debug.c, line 567
- external/bsd/wpa/dist/src/wps/http_client.c, line 152
- external/bsd/wpa/dist/src/wps/http_server.c, 2 times
- external/bsd/wpa/dist/src/wps/wps_upnp_ssdp.c, 2 times
- external/bsd/wpa/dist/wpa_supplicant/ctrl_iface_unix.c, 4 times
- external/cddl/osnet/dist/lib/libdtrace/common/dt_open.c, 2 times
- external/cddl/osnet/dist/lib/libzpool/common/kernel.c, line 500
- external/cddl/osnet/include/fcntl.h, line 35
- external/gpl2/diffutils/dist/src/system.h, line 138
- external/gpl2/gettext/dist/gettext-tools/src/msgfilter.c, 4 times
- external/gpl2/gmake/dist/getloadavg.c, line 924
- external/gpl2/gmake/dist/job.c, 3 times
- external/gpl2/gmake/dist/job.h, line 35
- external/gpl2/lvm2/dist/daemons/clvmd/clvmd-gulm.c, line 128
- external/gpl2/lvm2/dist/daemons/clvmd/clvmd-openais.c, line 239
- external/gpl2/lvm2/dist/daemons/clvmd/clvmd.c, 3 times
- external/gpl2/lvm2/dist/daemons/clvmd/tcp-comms.c, 2 times
- external/gpl2/lvm2/dist/lib/misc/lvm-file.c, 3 times
- external/gpl2/lvm2/dist/test/harness.c, line 137
- external/gpl2/lvm2/dist/tools/lvmcmdline.c, line 1129
- external/gpl2/rcs/dist/src/rcsfnms.c, line 954
- external/gpl2/rcs/dist/src/rcsutil.c, 5 times
- external/gpl2/texinfo/dist/info/session.c, 3 times
- external/gpl2/xcvs/dist/lib/dup-safer.c, line 43
- external/gpl2/xcvs/dist/lib/dup2.c, line 60
- external/gpl2/xcvs/dist/lib/ftruncate.c, 2 times
- external/gpl2/xcvs/dist/src/buffer.c, 2 times
- external/gpl2/xcvs/dist/src/run.c, line 620
- external/gpl2/xcvs/dist/src/server.c, 2 times
- external/gpl3/binutils/dist/bfd/bfdio.c, 2 times
- external/gpl3/binutils/dist/bfd/opncls.c, line 340
- external/gpl3/binutils/dist/gold/descriptors.cc, line 53
- external/gpl3/binutils/dist/gold/ftruncate.c, 2 times
- external/gpl3/binutils/dist/libiberty/pex-unix.c, 8 times
- external/gpl3/gcc/dist/gcc/gcov-io.c, line 168
- external/gpl3/gcc/dist/libbacktrace/posix.c, line 82
- external/gpl3/gcc/dist/libcpp/files.c, 2 times
- external/gpl3/gcc/dist/libiberty/pex-unix.c, 8 times
- external/gpl3/gdb/dist/bfd/bfdio.c, 2 times
- external/gpl3/gdb/dist/bfd/opncls.c, line 340
- external/gpl3/gdb/dist/gdb/aarch64-linux-tdep.c, line 1071
- external/gpl3/gdb/dist/gdb/common/filestuff.c, 2 times
- external/gpl3/gdb/dist/gdb/gdbserver/gdbreplay.c, line 288
- external/gpl3/gdb/dist/gdb/gdbserver/linux-low.c, 2 times
- external/gpl3/gdb/dist/gdb/gdbserver/remote-utils.c, 3 times
- external/gpl3/gdb/dist/gdb/gnulib/import/cloexec.c, 3 times
- external/gpl3/gdb/dist/gdb/gnulib/import/dup-safer.c, line 33
- external/gpl3/gdb/dist/gdb/gnulib/import/dup2.c, 3 times
- external/gpl3/gdb/dist/gdb/gnulib/import/error.c, 3 times
- external/gpl3/gdb/dist/gdb/gnulib/import/fcntl.c, 11 times
- external/gpl3/gdb/dist/gdb/gnulib/import/fcntl.in.h, 9 times
- external/gpl3/gdb/dist/gdb/inflow.c, 4 times
- external/gpl3/gdb/dist/gdb/linux-nat.c, 2 times
- external/gpl3/gdb/dist/gdb/ser-event.c, 2 times
- external/gpl3/gdb/dist/gdb/ser-pipe.c, line 89
- external/gpl3/gdb/dist/gdb/tui/tui-io.c, 2 times
- external/gpl3/gdb/dist/libiberty/pex-unix.c, 9 times
- external/gpl3/gdb/dist/readline/input.c, 3 times
- external/gpl3/gdb/dist/readline/shell.c, 2 times
- external/gpl3/gdb/dist/sim/bfin/dv-bfin_emac.c, 2 times
- external/gpl3/gdb/dist/sim/common/dv-sockser.c, 2 times
- external/gpl3/gdb/dist/sim/common/sim-io.c, 3 times
- external/gpl3/gdb/dist/sim/erc32/interf.c, 2 times
- external/gpl3/gdb/dist/sim/erc32/sis.c, line 227
- external/gpl3/gdb/dist/sim/m32r/traps-linux.c, line 470
- external/gpl3/gdb/dist/sim/ppc/emul_netbsd.c, 2 times
- external/gpl3/gdb/dist/sim/ppc/main.c, 3 times
- external/gpl3/gdb/dist/sim/testsuite/sim/cris/c/fcntl1.c, line 14
- external/ibm-public/postfix/dist/src/master/event_server.c, line 392
- external/ibm-public/postfix/dist/src/master/multi_server.c, line 388
- external/ibm-public/postfix/dist/src/util/close_on_exec.c, 2 times
- external/ibm-public/postfix/dist/src/util/dup2_pass_on_exec.c, 2 times
- external/ibm-public/postfix/dist/src/util/myflock.c, line 135
- external/ibm-public/postfix/dist/src/util/non_blocking.c, 2 times
- external/ibm-public/postfix/dist/src/util/vstream.c, line 1450
- external/mpl/bind/dist/bin/named/unix/os.c, line 816
- external/mpl/bind/dist/lib/isc/unix/net.c, 2 times
- external/mpl/bind/dist/lib/isc/unix/socket.c, 5 times
- external/mpl/dhcp/dist/common/discover.c, 4 times
- external/mpl/dhcp/dist/common/icmp.c, line 103
- external/mpl/dhcp/dist/omapip/connection.c, 2 times
- external/mpl/dhcp/dist/omapip/listener.c, 2 times
- external/mpl/dhcp/dist/omapip/trace.c, 2 times
- external/public-domain/sqlite/dist/sqlite3.c, line 32784
- external/public-domain/xz/dist/src/common/tuklib_open_stdxxx.c, 2 times
- external/public-domain/xz/dist/src/lzmainfo/lzmainfo.c, line 24
- external/public-domain/xz/dist/src/xz/file_io.c, 9 times
- external/public-domain/xz/dist/src/xz/suffix.c, line 16
- external/public-domain/xz/dist/src/xzdec/xzdec.c, line 26
- games/atc/log.c, 2 times
- games/cribbage/crib.c, 2 times
- games/hunt/huntd/answer.c, 2 times
- lib/libc/db/db/dbfile.c, 2 times
- lib/libc/gen/closefrom.c, line 44
- lib/libc/gen/lockf.c, 2 times
- lib/libc/gen/opendir.c, line 108
- lib/libc/gen/xsyslog.c, line 86
- lib/libc/net/rcmd.c, line 233
- lib/libc/resolv/res_init.c, line 512
- lib/libc/resolv/res_send.c, 2 times
- lib/libc/rpc/clnt_simple.c, line 196
- lib/libc/rpc/svc_fdset.h, line 8
- lib/libc/rpc/svc_vc.c, 2 times
- lib/libc/stdio/fdopen.c, line 87
- lib/libc/stdio/vdprintf.c, line 83
- lib/libc/yp/yplib.c, line 270
- lib/libedit/read.c, 2 times
- lib/libedit/readline.c, 3 times
- lib/libpam/modules/pam_ssh/pam_ssh.c, line 329
- lib/libpthread/pthread_cancelstub.c, line 755
- lib/libpuffs/puffs.c, line 543
- lib/librmt/rmtlib.c, line 861
- lib/librumpclient/rumpclient.c, line 916
- lib/librumpuser/rumpuser_sp.c, 2 times
- lib/libukfs/ukfs.c, 3 times
- lib/libutil/ttymsg.c, line 186
- libexec/atrun/atrun.c, 2 times
- libexec/ftpd/conf.c, 2 times
- libexec/ftpd/ftpd.c, line 727
- libexec/lfs_cleanerd/cleansrv.c, 3 times
- libexec/rshd/rshd.c, line 643
- regress/sys/fs/lfs/ckckp/ckckp.c, 2 times
- regress/sys/kern/select/select.c, line 193
- sbin/dump_lfs/lfs_inode.c, 3 times
- sbin/fsck_lfs/kernelops.c, line 72
- sbin/resize_lfs/resize_lfs.c, 2 times
- sbin/routed/main.c, 2 times
- sys/arch/usermode/usermode/thunk.c, 8 times
- sys/external/bsd/compiler_rt/dist/lib/msan/tests/msan_test.cc, line 1011
- sys/external/bsd/libnv/dist/common_impl.h, line 39
- sys/external/bsd/libnv/dist/msgio.c, line 113
- sys/external/bsd/libnv/dist/nvpair.c, 3 times
- sys/rump/librump/rumpkern/rump_syscalls.c, line 1303
- tests/kernel/t_lockf.c, line 102
- tests/kernel/t_pty.c, 2 times
- tests/lib/libc/gen/t_closefrom.c, 6 times
- tests/lib/libc/sys/t_mmap.c, line 127
- tests/lib/libc/sys/t_pipe2.c, 12 times
- tests/lib/libc/sys/t_socketpair.c, 8 times
- tests/lib/libc/sys/t_stat.c, 2 times
- tests/lib/libcurses/director/director.c, line 265
- tests/lib/librumphijack/h_client.c, line 130
- tests/modules/t_kcov.c, line 68
- tests/net/net/t_tcp.c, 5 times
- tools/compat/flock.c, line 68
- usr.bin/at/at.c, 2 times
- usr.bin/bthset/bthset.c, line 478
- usr.bin/chpass/chpass.c, 3 times
- usr.bin/ftp/ftp.c, 3 times
- usr.bin/ftp/ssl.c, line 272
- usr.bin/ftp/util.c, 3 times
- usr.bin/ktrace/ktrace.c, 2 times
- usr.bin/login/login.c, line 260
- usr.bin/login/login_pam.c, line 200
- usr.bin/mail/lex.c, 2 times
- usr.bin/make/job.c, 12 times
- usr.bin/make/main.c, 2 times
- usr.bin/make/meta.c, 4 times
- usr.bin/rlogin/rlogin.c, line 676
- usr.bin/tip/tip.c, 2 times
- usr.bin/xinstall/xinstall.c, 2 times
- usr.sbin/faithd/tcp.c, line 208
- usr.sbin/inetd/inetd.c, 2 times
- usr.sbin/ldpd/ldp_peer.c, 2 times
- usr.sbin/mmcformat/uscsi_subr.c, 2 times
- usr.sbin/perfused/perfused.c, 2 times
- usr.sbin/powerd/powerd_hostops.c, line 47
- usr.sbin/syslogd/syslogd.c, line 4218
- usr.sbin/syslogd/tls.c, 2 times
- usr.sbin/timed/timedc/timedc.c, line 74
- usr.sbin/tpctl/main.c, 3 times
- usr.sbin/tpctl/tp.c, 2 times
- usr.sbin/ypbind/ypbind.c, 4 times