Searched refs:fd1 (Results 1 - 25 of 36) sorted by relevance

12

/macosx-10.10/ruby-106/ruby/missing/
H A Ddup2.c8 * Check to make sure that fd1 is a valid open file descriptor.
10 * Duplicate fd1 onto fd2; checking to make sure fd2 is a valid fd.
27 dup2(int fd1, int fd2) argument
30 if (fd1 != fd2) {
32 if (fcntl(fd1, F_GETFL) < 0)
39 if (fcntl(fd1, F_DUPFD, fd2) < 0)
47 if (fd1 == fd2) return 0;
50 fd = fds[i] = dup(fd1);
/macosx-10.10/cxxfilt-11/cxxfilt/libiberty/
H A Dfdmatch.c23 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
52 int fdmatch (int fd1, int fd2) argument
57 if ((fstat (fd1, &sbuf1) == 0) &&
/macosx-10.10/tcl-105/tcl_ext/expect/expect/example/
H A Dchesslib++.c60 int fd1, fd2; local
65 if (-1 == (fd1 = exp_spawnl("chess","chess",(char *)0))) {
70 if (-1 == exp_expectl(fd1,exp_glob,"Chess\r\n",0,exp_end)) exit;
72 if (-1 == write(fd1,"first\r",6)) exit;
74 read_first_move(fd1);
84 send_move(fd1);
85 read_move(fd1);
H A Dchesslib.c56 int fd1, fd2; local
61 if (-1 == (fd1 = exp_spawnl("chess","chess",(char *)0))) {
66 if (-1 == exp_expectl(fd1,exp_glob,"Chess\r\n",0,exp_end)) exit;
68 if (-1 == write(fd1,"first\r",6)) exit;
70 read_first_move(fd1);
80 send_move(fd1);
81 read_move(fd1);
/macosx-10.10/rsync-45/rsync/
H A Dreceiver.c348 int fd1,fd2; local
542 fd1 = do_open(fnamecmp, O_RDONLY, 0);
544 if (fd1 == -1 && protocol_version < 29) {
547 fd1 = do_open(fnamecmp, O_RDONLY, 0);
550 if (fd1 == -1 && basis_dir[0]) {
555 fd1 = do_open(fnamecmp, O_RDONLY, 0);
559 if (fd1 == -1) {
562 } else if (do_fstat(fd1,&st) != 0) {
566 close(fd1);
570 if (fd1 !
[all...]
/macosx-10.10/Heimdal-398.1.2/appl/kx/
H A Dcontext.c91 copy_encrypted (kx_context *kc, int fd1, int fd2) argument
93 return (*kc->copy_encrypted)(kc, fd1, fd2);
H A Dkrb5.c284 * Copy data between `fd1' and `fd2', encrypting in one direction and
289 krb5_copy_encrypted (kx_context *kc, int fd1, int fd2) argument
295 if (fd1 >= FD_SETSIZE || fd2 >= FD_SETSIZE) {
301 FD_SET(fd1, &fdset);
304 ret = select (max(fd1, fd2)+1, &fdset, NULL, NULL, NULL);
309 if (FD_ISSET(fd1, &fdset)) {
310 ret = copy_out (kc, fd1, fd2);
315 ret = copy_in (kc, fd2, fd1);
H A Dkx.h188 int fd1, int fd2);
226 copy_encrypted (kx_context *kc, int fd1, int fd2);
/macosx-10.10/bash-94.1.2/bash-3.2/lib/sh/
H A Doslib.c84 dup2 (fd1, fd2)
85 int fd1, fd2;
91 if (fcntl (fd1, F_GETFL, 0) == -1)
100 if (fd1 == fd2)
106 r = fcntl (fd1, F_DUPFD, fd2);
/macosx-10.10/ksh-23/ksh/src/cmd/ksh93/bltins/
H A Dmkservice.c155 static int fdnotify(int fd1, int fd2) argument
159 (*covered_fdnotify)(fd1, fd2);
163 service_list[fd2] = service_list[fd1];
164 service_list[fd1] = 0;
167 if(file_list[i]==fd1)
174 else if(sp = service_list[fd1])
176 fdclose(sp,fd1);
/macosx-10.10/bash-94.1.2/bash-3.2/
H A Dinput.c297 /* This is the buffered stream analogue of dup2(fd1, fd2). The
299 BUFFERS[fd1] is copied to BUFFERS[fd2]. This is called by the
302 duplicate_buffered_stream (fd1, fd2)
303 int fd1, fd2;
307 if (fd1 == fd2)
310 m = max (fd1, fd2);
315 actually exists (it might not if fd1 was not active, and the copy
323 if (buffers[fd1] && buffers[fd1]->b_buffer && buffers[fd1]
[all...]
/macosx-10.10/zsh-61/zsh/Src/
H A Dexec.c2080 * Add a fd to an multio. fd1 must be < 10, and may be in any state.
2082 * fd1 == fd2 is possible, and indicates that fd1 was really closed.
2089 * named varid to that value. fd1 is not used.
2094 addfd(int forked, int *save, struct multio **mfds, int fd1, int fd2, int rflag, argument
2101 fd1 = movefd(fd2);
2102 if (fd1 == -1) {
2106 fdtable[fd1] = FDT_EXTERNAL;
2107 setiparam(varid, (zlong)fd1);
2113 zclose(fd1);
[all...]
/macosx-10.10/mail_cmds-30/mail/
H A Dpopen.c114 int myside, hisside, fd0, fd1; local
126 hisside = fd1 = p[WRITE];
130 fd1 = -1;
133 if ((pid = start_command(cmd, &nset, fd0, fd1, NULL, NULL, NULL)) < 0) {
/macosx-10.10/emacs-93/emacs/src/
H A Dcallproc.c512 register int fd1 = fd[1];
513 int fd_error = fd1;
547 if (fd1 >= 0) variable
548 emacs_close (fd1);
571 fd1 = -1; /* No harm in closing that one! */
625 fd1 = -1; /* No harm in closing that one! */
637 pid = child_setup (filefd, fd1, fd_error, (char **) new_argv,
656 child_setup (filefd, fd1, fd_error, (char **) new_argv,
674 if (fd1 >= 0 && fd1 ! variable
511 register int fd1 = fd[1]; variable
[all...]
/macosx-10.10/gnutar-453/gnutar/src/
H A Dmisc.c602 int fd1 = prev->saved_cwd.desc;
603 int fd2 = dup (fd1);
609 close (fd1);
599 int fd1 = prev->saved_cwd.desc; local
/macosx-10.10/ruby-106/ruby/ext/io/console/
H A Dconsole.c629 int fd1, fd2; local
634 fd1 = GetReadFD(fptr);
636 if (fd2 != -1 && fd1 != fd2) {
637 if (tcflush(fd1, TCIFLUSH)) rb_sys_fail(0);
641 if (tcflush(fd1, TCIOFLUSH)) rb_sys_fail(0);
/macosx-10.10/file_cmds-242/pax/
H A Dbuf_subs.c761 cp_file(ARCHD *arcn, int fd1, int fd2) argument
795 if ((cnt = read(fd1, buf, blksz)) <= 0)
815 else if (fstat(fd1, &sb) < 0)
/macosx-10.10/bind9-45.101/bind9/unit/atf-src/atf-c/detail/
H A Dfs_test.c945 int fd1, fd2; local
951 fd1 = fd2 = -1;
952 RE(atf_fs_mkstemp(&p1, &fd1));
958 ATF_CHECK(fd1 != -1);
960 ATF_CHECK(write(fd1, "foo", 3) == 3);
962 close(fd1);
/macosx-10.10/Heimdal-398.1.2/lib/krb5/
H A Dfcache.c991 int fd1, fd2; local
994 ret = fcc_open(context, from, "move/from", &fd1, O_RDONLY | O_BINARY | O_CLOEXEC, 0);
1005 while((sz1 = read(fd1, buf, sizeof(buf))) > 0) {
1027 fcc_unlock(context, fd1);
1028 close(fd1);
/macosx-10.10/Security-57031.1.35/Security/include/security_keychain/
H A DDLDBListCFPref.cpp344 int fd1, fd2, retval; local
347 if((fd1 = open(prefsPath, O_RDONLY)) < 0) {
352 if((retval = fstat(fd1, &stbuf)) == -1) return -1;
364 retval = fcopyfile(fd1, fd2, s, COPYFILE_DATA);
372 close(fd1);
/macosx-10.10/Security-57031.1.35/Security/libsecurity_keychain/Security/
H A DDLDBListCFPref.cpp344 int fd1, fd2, retval; local
347 if((fd1 = open(prefsPath, O_RDONLY)) < 0) {
352 if((retval = fstat(fd1, &stbuf)) == -1) return -1;
364 retval = fcopyfile(fd1, fd2, s, COPYFILE_DATA);
372 close(fd1);
/macosx-10.10/Security-57031.1.35/Security/libsecurity_keychain/lib/
H A DDLDBListCFPref.cpp344 int fd1, fd2, retval; local
347 if((fd1 = open(prefsPath, O_RDONLY)) < 0) {
352 if((retval = fstat(fd1, &stbuf)) == -1) return -1;
364 retval = fcopyfile(fd1, fd2, s, COPYFILE_DATA);
372 close(fd1);
/macosx-10.10/msdosfs-209.1.1/newfs_msdos.tproj/
H A Dnewfs_msdos.c377 int ch, fd, fd1; local
577 fd1 = -1;
585 if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb))
858 if (!x && lseek(fd1, 0, SEEK_SET))
862 if ((n = read(fd1, img, bpb.bps)) == -1)
/macosx-10.10/cxxfilt-11/cxxfilt/include/
H A Dlibiberty.h167 extern int fdmatch (int fd1, int fd2);
/macosx-10.10/libxml2-26/libxml2/
H A Druntest.c609 int fd1, fd2; local
613 fd1 = open(r1, RD_FLAGS);
614 if (fd1 < 0)
618 close(fd1);
622 res1 = read(fd1, bytes1, 4096);
625 close(fd1);
632 close(fd1);
637 close(fd1);

Completed in 347 milliseconds

12