Searched refs:fd (Results 201 - 225 of 1892) sorted by relevance

1234567891011>>

/openbsd-current/regress/lib/libc/sys/
H A Dt_dup.c59 int fd, fd1, fd2; local
77 fd = dup(fd1);
79 fd = dup2(fd1, fd2);
81 fd = dup3(fd1, fd2, O_CLOEXEC);
83 fd = -1;
86 ATF_REQUIRE(fd >= 0);
91 ATF_REQUIRE(fstat(fd, &st) == 0);
97 (void)close(fd);
113 int fd, fd1, fd2; local
121 fd
141 int fd; local
206 int fd; local
293 int *buf, fd, sta; local
[all...]
H A Dt_stat.c63 int fd; local
68 fd = open(path, O_RDONLY | O_CREAT, 0600);
70 ATF_REQUIRE(fd != -1);
78 ATF_REQUIRE(close(fd) == 0);
206 int fd[3]; local
209 for (i = 0; i < __arraycount(fd); i++) {
214 fd[i] = open(path, O_WRONLY | O_CREAT, 0600);
216 ATF_REQUIRE(fd[i] != -1);
217 ATF_REQUIRE(write(fd[i], "X", 1) == 1);
222 ATF_REQUIRE(write(fd[
250 int fd; local
290 int fd; local
334 int fd, flags; local
376 int fd; local
[all...]
H A Dt_mmap.c173 int fd = -1; local
198 if ((fd = open(dev, O_RDONLY)) >= 0) {
206 if (fd < 0)
209 map = mmap(NULL, 4096, PROT_READ, MAP_FILE, fd, 0);
213 ATF_REQUIRE(close(fd) == 0);
259 int fd; local
261 fd = open(path, O_RDWR | O_CREAT, 0600);
262 ATF_REQUIRE(fd >= 0);
265 (void)write(fd, buf, sizeof(buf));
268 MAP_FILE | MAP_PRIVATE, fd,
308 int fd; local
379 int fd, sta; local
435 int fd; local
482 int fd, sta; local
[all...]
/openbsd-current/lib/libsndio/
H A Dmio_rmidi.c39 int fd; member in struct:mio_rmidi_hdl
64 int fd, flags; local
96 while ((fd = open(path, flags | O_NONBLOCK | O_CLOEXEC)) == -1) {
102 return fd;
106 mio_rmidi_fdopen(int fd, unsigned int mode, int nbio) argument
117 hdl->fd = fd;
125 int fd; local
127 fd = mio_rmidi_getfd(str, mode, nbio);
128 if (fd
[all...]
/openbsd-current/regress/sys/kern/poll/
H A Dpoll_iocond.c298 proc_barrier(int fd) argument
303 ret = write(fd, &b, 1);
305 ret = read(fd, &b, 1);
310 proc_child(int fd, int bfd) argument
322 pfd[0].fd = fd;
331 ret = write(fd, &b, 1);
351 pfd[0].fd = fd;
358 ret = write(fd, bu
490 proc_parent(int fd, int bfd) argument
[all...]
/openbsd-current/gnu/usr.bin/binutils/gdb/testsuite/gdb.base/
H A Dfileio.c18 read(int fd, void *buf, size_t count);
21 write(int fd, const void *buf, size_t count);
29 close(int fd);
124 int fd, ret; local
128 fd = open (FILENAME, O_WRONLY);
129 if (fd >= 0)
132 ret = write (fd, STRING, strlen (STRING));
135 close (fd);
146 fd = open (FILENAME, O_RDONLY);
147 if (fd >
161 int fd, ret; local
191 int fd; local
226 int fd, ret; local
281 int fd, ret; local
310 int fd; local
[all...]
/openbsd-current/gnu/llvm/compiler-rt/lib/profile/
H A DInstrProfilingUtil.c136 COMPILER_RT_VISIBILITY int lprofLockFd(int fd) { argument
146 while (fcntl(fd, F_SETLKW, &s_flock) == -1) {
156 flock(fd, LOCK_EX);
161 COMPILER_RT_VISIBILITY int lprofUnlockFd(int fd) { argument
171 while (fcntl(fd, F_SETLKW, &s_flock) == -1) {
181 flock(fd, LOCK_UN);
187 int fd; local
189 fd = _fileno(F);
191 fd = fileno(F);
193 return lprofLockFd(fd);
197 int fd; local
208 int fd; local
[all...]
/openbsd-current/gnu/llvm/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_file.cpp39 if (fd == kStdoutFd || fd == kStderrFd) return;
45 if (fd != kInvalidFd) {
52 CloseFile(fd);
66 fd = OpenFile(full_path, WrOnly, &err);
67 if (fd == kInvalidFd) {
108 if (fd != kStdoutFd && fd != kStderrFd && fd != kInvalidFd)
109 CloseFile(fd);
142 fd_t fd = OpenFile(file_name, RdOnly, errno_p); local
178 fd_t fd = OpenFile(file_name, RdOnly, errno_p); local
241 __sanitizer_set_report_fd(void *fd) argument
[all...]
/openbsd-current/gnu/llvm/lldb/examples/interposing/darwin/fd_interposing/
H A DFDInterposing.cpp150 FDEvent(int fd, int err, const StringSP &string_sp, bool is_create, argument
153 m_fd(fd), m_err(err), m_is_create(is_create) {}
349 // Keep all stack info around for all fd create and delete calls.
350 // Otherwise we will remove the fd create call when a corresponding
351 // fd delete call is received
468 void save_backtrace(int fd, int err, const StringSP &string_sp, argument
473 FDEventSP fd_event_sp(new FDEvent(fd, err, string_sp, is_create, frames));
475 FDEventMap::iterator pos = g_fd_event_map.find(fd);
478 // We have history for this fd...
480 FDEventArray &event_array = g_fd_event_map[fd];
531 const int fd = ::socket(domain, type, protocol); local
584 int fd = -2; local
614 const int fd = ::open$NOCANCEL(path, oflag, mode); local
636 const int fd = ::__open_extended(path, oflag, uid, gid, mode, fsacl); local
657 const int fd = ::kqueue(); local
675 const int fd = ::shm_open(path, oflag, mode); local
696 const int fd = ::accept(socket, address, address_len); local
717 const int fd = ::accept$NOCANCEL(socket, address, address_len); local
736 const int fd = ::dup(fd2); local
765 const int fd = ::dup2(fd1, fd2); local
781 close$__interposed__(int fd) argument
819 close$NOCANCEL$__interposed__(int fd) argument
890 get_fd_history(int log_fd, int fd) argument
[all...]
/openbsd-current/games/cribbage/
H A Dinstr.c48 int fd; local
52 if ((fd = open(_PATH_INSTR, O_RDONLY)) == - 1)
65 if (dup2(fd, 0) == -1)
73 close(fd);
/openbsd-current/games/sail/
H A Dmain.c47 int fd; local
53 fd = open("/dev/null", O_RDONLY);
54 if (fd < 3)
56 close(fd);
/openbsd-current/usr.bin/sndiod/
H A Dlisten.h26 int fd; member in struct:listen
/openbsd-current/usr.bin/cvs/
H A Datomicio.c41 atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n) argument
48 pfd.fd = fd;
51 res = (f) (fd, s + pos, n - pos);
/openbsd-current/usr.bin/nc/
H A Datomicio.c39 atomicio(ssize_t (*f) (int, void *, size_t), int fd, void *_s, size_t n) argument
46 pfd.fd = fd;
49 res = (f) (fd, s + pos, n - pos);
/openbsd-current/sys/lib/libsa/
H A Dread.c69 read(int fd, void *dest, size_t bcount) argument
71 oread(int fd, void *dest, size_t bcount)
74 struct open_file *f = &files[fd];
77 if ((unsigned)fd >= SOPEN_MAX || !(f->f_flags & F_READ)) {
/openbsd-current/usr.sbin/radiusd/
H A Dimsg_subr.c41 fds[0].fd = ibuf->fd;
67 fds[0].fd = ibuf->fd;
/openbsd-current/regress/sys/dev/wscons/
H A Dutil.c35 int c, fd; local
50 fd = open(dev, O_RDWR);
51 if (fd == -1)
61 return test->t_func(fd);
/openbsd-current/usr.bin/mail/
H A Dv7.local.c74 int fd; local
77 fd = open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600);
78 if (fd != -1)
79 close(fd);
/openbsd-current/regress/sys/kern/signal/sigio/
H A Dsigio_common.c33 test_common_badpgid(int fd) argument
40 assert(fcntl(fd, F_SETOWN, pgid) == -1);
43 assert(ioctl(fd, FIOSETOWN, &pgid) == -1);
49 assert(fcntl(fd, F_SETOWN, pgid) == -1);
52 assert(ioctl(fd, FIOSETOWN, &pgid) == -1);
59 test_common_badsession(int fd) argument
73 assert(fcntl(fd, F_SETOWN, ppid) == -1);
76 assert(fcntl(fd, F_SETOWN, -ppid) == -1);
80 assert(ioctl(fd, FIOSETOWN, &arg) == -1);
84 assert(ioctl(fd, FIOSETOW
147 test_common_getown(int fd) argument
[all...]
/openbsd-current/gnu/llvm/lldb/tools/debugserver/source/
H A DPseudoTerminal.h52 int fd = m_primary_fd; local
54 return fd;
60 int fd = m_secondary_fd; local
62 return fd;
/openbsd-current/regress/sys/uvm/mmap0/
H A Dmmap0.c38 int fd; local
40 fd = open("/dev/zero", O_RDWR);
41 if (fd == -1)
54 ptr = mmap(NULL, 0, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
56 warn("mmap(len=0, fd=\"/dev/zero\") returned %p, "
60 warn("mmap(len=0, fd=\"/dev/zero\") errno %d, expected %d",
/openbsd-current/usr.sbin/dvmrpd/
H A Dcontrol.c47 int fd; member in struct:__anon52
54 int fd; local
57 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
70 close(fd);
75 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
77 close(fd);
85 close(fd);
90 control_state.fd = fd;
98 if (listen(control_state.fd, CONTROL_BACKLO
166 control_connbyfd(int fd) argument
192 control_close(int fd) argument
217 control_dispatch_imsg(int fd, short event, void *bula) argument
[all...]
/openbsd-current/usr.sbin/ripd/
H A Dcontrol.c46 int fd; member in struct:__anon67
53 int fd; local
56 if ((fd = socket(AF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK,
69 close(fd);
74 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
76 close(fd);
84 close(fd);
89 control_state.fd = fd;
97 if (listen(control_state.fd, CONTROL_BACKLO
157 control_connbyfd(int fd) argument
183 control_close(int fd) argument
208 control_dispatch_imsg(int fd, short event, void *bula) argument
[all...]
/openbsd-current/usr.sbin/iscsid/
H A Dcontrol.c39 int fd; member in struct:control
45 int fd; member in struct:control_state
59 int fd; local
67 if ((fd = socket(AF_UNIX, SOCK_SEQPACKET, 0)) == -1) {
77 close(fd);
84 close(fd);
89 if (bind(fd, (struct sockaddr *)&sun, sizeof(sun)) == -1) {
91 close(fd);
99 close(fd);
104 if (listen(fd, CONTROL_BACKLO
199 control_dispatch(int fd, short event, void *bula) argument
[all...]
/openbsd-current/gnu/llvm/lldb/tools/lldb-vscode/
H A DOutputRedirector.cpp23 Error RedirectFd(int fd, std::function<void(llvm::StringRef)> callback) { argument
32 "Couldn't create new pipe for fd %d. %s", fd,
36 if (dup2(new_fd[1], fd) == -1) {
39 "Couldn't override the fd %d. %s", fd,

Completed in 312 milliseconds

1234567891011>>