HomeSort by: relevance | last modified time | path
    Searched refs:newfd (Results 1 - 25 of 128) sorted by relevancy

1 2 3 4 5 6

  /src/lib/libc/compat/sys/
compat_dup3.c 45 dup3(int oldfd, int newfd, int flags)
49 if (oldfd != newfd) {
50 return __dup3100(oldfd, newfd, flags);
53 int e = fcntl(newfd, F_GETFL, 0);
57 e = fcntl(newfd, F_SETFL, e);
75 return fcntl(newfd, F_SETFD, fdflags);
  /src/external/gpl3/gdb/dist/gnulib/import/
fchdir.c 149 /* Mark NEWFD as a duplicate of OLDFD; useful from dup, dup2, dup3,
151 descriptors. Close NEWFD and return -1 if OLDFD is tracking a
153 directory in NEWFD; otherwise return NEWFD. */
155 _gl_register_dup (int oldfd, int newfd)
157 assure (0 <= oldfd && 0 <= newfd && oldfd != newfd);
160 /* Duplicated a directory; must ensure newfd is allocated. */
161 if (!ensure_dirs_slot (newfd)
162 || (dirs[newfd].name = strdup (dirs[oldfd].name)) == NULL
    [all...]
fcntl.c 51 /* Duplicate OLDFD into the first available slot of at least NEWFD,
55 dupfd (int oldfd, int newfd, int flags)
58 file descriptors less than newfd are filled up. */
67 if (newfd < 0 || getdtablesize () <= newfd)
126 if (newfd <= duplicated_fd)
  /src/external/gpl3/gdb.old/dist/gnulib/import/
fchdir.c 149 /* Mark NEWFD as a duplicate of OLDFD; useful from dup, dup2, dup3,
151 descriptors. Close NEWFD and return -1 if OLDFD is tracking a
153 directory in NEWFD; otherwise return NEWFD. */
155 _gl_register_dup (int oldfd, int newfd)
157 assure (0 <= oldfd && 0 <= newfd && oldfd != newfd);
160 /* Duplicated a directory; must ensure newfd is allocated. */
161 if (!ensure_dirs_slot (newfd)
162 || (dirs[newfd].name = strdup (dirs[oldfd].name)) == NULL
    [all...]
  /src/lib/libossaudio/
oss4_mixer.c 63 int newfd = -1, tmperrno; local
109 if ((newfd = open(tmpai->devnode, O_WRONLY)) < 0) {
110 if ((newfd = open(tmpai->devnode, O_RDONLY)) < 0) {
111 return newfd;
115 retval = ioctl(newfd, AUDIO_GETDEV, &dev);
118 close(newfd);
122 if (_oss_get_caps(newfd, &tmpai->caps) < 0) {
124 close(newfd);
132 _oss_dsp_ioctl(newfd, SNDCTL_DSP_GETFMTS, &tmpai->iformats);
151 ioctl(newfd, AUDIO_QUERYFORMAT, &fmtq) != -1; ++fmtq.index)
    [all...]
  /src/external/ibm-public/postfix/dist/src/util/
unix_recv_fd.c 61 int newfd;
73 char control[CMSG_SPACE(sizeof(newfd))];
80 msg.msg_controllen = CMSG_LEN(sizeof(newfd)); /* Fix 200506 */
82 msg.msg_controllen = CMSG_SPACE(sizeof(newfd)); /* normal */
85 msg.msg_accrights = (char *) &newfd;
86 msg.msg_accrightslen = sizeof(newfd);
109 && cmptr->cmsg_len == CMSG_LEN(sizeof(newfd))) {
120 if (msg.msg_accrightslen == sizeof(newfd))
121 return (newfd);
  /src/external/cddl/osnet/lib/libzfs/
fsshare.c 153 FILE *newfd, *oldfd; local
156 newfd = oldfd = NULL;
176 newfd = fdopen(fd, "r+");
177 assert(newfd != NULL);
200 fprintf(newfd, "%s", FILE_HEADER);
202 fprintf(newfd, "%s\n", line);
207 if (ferror(newfd) != 0) {
208 error = ferror(newfd);
212 fprintf(newfd, "%s\t%s\n", mountpoint,
234 if (newfd != NULL)
    [all...]
  /src/external/bsd/ntp/dist/libntp/
socket.c 81 SOCKET newfd; local
104 newfd = fcntl(fd, F_DUPFD, socket_boundary);
106 if (newfd != -1) {
109 return newfd;
  /src/external/gpl2/lvm2/dist/daemons/clvmd/
clvmd.c 283 struct local_client *newfd; local
457 newfd = malloc(sizeof(struct local_client));
458 if (!newfd)
461 newfd->fd = local_sock;
462 newfd->removeme = 0;
463 newfd->type = LOCAL_RENDEZVOUS;
464 newfd->callback = local_rendezvous_callback;
465 newfd->next = local_client_head.next;
466 local_client_head.next = newfd;
523 struct local_client *newfd; local
750 struct local_client *newfd = NULL; local
995 struct local_client *newfd; local
1033 struct local_client *newfd; local
    [all...]
tcp-comms.c 195 int newfd; local
203 newfd = accept(listen_fd, (struct sockaddr *)&addr, &addrlen);
205 DEBUGLOG("cluster_fd_callback, newfd=%d (errno=%d)\n", newfd, errno);
206 if (!newfd)
222 close(newfd);
228 status = alloc_client(newfd, (char *)&addr.sin6_addr, new_client);
232 close(newfd);
237 DEBUGLOG("cluster_fd_callback, returning %d, %p\n", newfd, *new_client);
238 return newfd;
    [all...]
  /src/sys/external/bsd/compiler_rt/dist/lib/tsan/rtl/
tsan_fd.h 47 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
54 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
tsan_fd.cc 225 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) {
226 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd);
227 if (bogusfd(oldfd) || bogusfd(newfd))
232 FdClose(thr, pc, newfd, write);
233 init(thr, pc, newfd, ref(od->sync), write);
280 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) {
281 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd);
286 init(thr, pc, newfd, &fdctx.socksync);
  /src/external/gpl3/gcc/dist/libsanitizer/tsan/
tsan_fd.h 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
54 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
tsan_fd.cpp 260 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) {
261 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd);
262 if (bogusfd(oldfd) || bogusfd(newfd))
267 FdClose(thr, pc, newfd, write);
268 init(thr, pc, newfd, ref(od->sync), write);
339 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) {
340 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd);
345 init(thr, pc, newfd, &fdctx.socksync);
  /src/external/gpl3/gcc.old/dist/libsanitizer/tsan/
tsan_fd.h 46 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write);
53 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd);
tsan_fd.cpp 225 void FdDup(ThreadState *thr, uptr pc, int oldfd, int newfd, bool write) {
226 DPrintf("#%d: FdDup(%d, %d)\n", thr->tid, oldfd, newfd);
227 if (bogusfd(oldfd) || bogusfd(newfd))
232 FdClose(thr, pc, newfd, write);
233 init(thr, pc, newfd, ref(od->sync), write);
280 void FdSocketAccept(ThreadState *thr, uptr pc, int fd, int newfd) {
281 DPrintf("#%d: FdSocketAccept(%d, %d)\n", thr->tid, fd, newfd);
286 init(thr, pc, newfd, &fdctx.socksync);
  /src/sys/lib/libsa/
nfs.c 216 struct nfs_iodesc *newfd)
323 setfh(newfd, replv2->fh);
324 (void)memcpy(&newfd->u_fa.v2, &replv2->fa,
325 sizeof(newfd->u_fa.v2));
336 setfh(newfd, replv3->fh);
345 (void)memcpy(&newfd->u_fa.v3, &replv3->fa,
346 sizeof(newfd->u_fa.v3));
603 struct nfs_iodesc *newfd, *currfd; local
631 newfd = 0;
664 newfd = alloc(sizeof(*newfd))
    [all...]
  /src/external/mit/libuv/dist/src/unix/
tty.c 139 int newfd; local
155 newfd = -1;
194 newfd = r;
196 r = uv__dup2_cloexec(newfd, fd);
198 /* EINVAL means newfd == fd which could conceivably happen if another
202 uv__close(newfd);
206 fd = newfd;
223 if (newfd != -1)
224 uv__close(newfd);
linux-syscalls.h 63 int uv__dup3(int oldfd, int newfd, int flags);
linux-syscalls.c 214 int uv__dup3(int oldfd, int newfd, int flags) {
218 return syscall(__NR_dup3, oldfd, newfd, flags);
  /src/sys/ufs/chfs/
chfs_write.c 421 struct chfs_dirent *newfd = NULL; local
424 newfd = chfs_alloc_dirent(namelen + 1);
426 newfd->vno = ip->ino;
427 newfd->type = type;
428 newfd->nsize = namelen;
429 memcpy(newfd->name, name, namelen);
430 newfd->name[newfd->nsize] = 0;
448 parent, ip, newfd, ip->ino, ALLOC_NORMAL);
454 TAILQ_INSERT_TAIL(&parent->dents, newfd, fds)
    [all...]
  /src/distrib/utils/ssh/
ssh.c 566 int newfd; local
569 if ((newfd = open(file, otype, def_omode)) < 0) {
573 if (newfd != setfd) {
574 dup2(newfd, setfd);
575 close(newfd);
  /src/bin/sh/
redir.c 639 int newfd; local
643 newfd = dup3(from, to, O_CLOEXEC);
645 newfd = dup2(from, to);
646 if (newfd >= 0)
647 fcntl(newfd, F_SETFD,
648 (fcntl_int)(fcntl(newfd, F_GETFD) | FD_CLOEXEC));
651 newfd = dup2(from, to);
653 if (move && newfd == to && from != to)
656 if (newfd != to) {
657 if (newfd < 0
    [all...]
  /src/lib/librumpuser/
rumpuser_sp.c 614 int newfd, flags; local
618 newfd = accept(fd, (struct sockaddr *)&ss, &sl);
619 if (newfd == -1)
623 close(newfd); /* EBUSY */
627 flags = fcntl(newfd, F_GETFL, 0);
628 if (fcntl(newfd, F_SETFL, flags | O_NONBLOCK) == -1) {
629 close(newfd);
633 if (connhook(newfd) != 0) {
634 close(newfd);
639 if (send(newfd, banner, strlen(banner), MSG_NOSIGNAL
    [all...]
  /src/sys/rump/fs/lib/libsyspuffs/
puffs_rumpglue.c 182 rump_syspuffs_glueinit(int fd, int *newfd)
210 *newfd = curlwp->l_dupfd;

Completed in 30 milliseconds

1 2 3 4 5 6