Searched refs:fd2 (Results 1 - 25 of 49) sorted by relevance

12

/freebsd-9.3-release/tools/regression/file/dup/
H A Ddup.c64 int orgfd, fd1, fd2, test = 0; local
80 if ((fd2 = dup2(fd1, fd1 + 1)) < 0)
86 if (fd2 != fd1 + 1)
94 if (fcntl(fd2, F_GETFD) != 0)
126 if ((fd2 = dup2(fd1, fd1)) < 0)
132 if (fd2 != fd1)
141 if (fcntl(fd2, F_GETFD) == 0)
147 if ((fd2 = fcntl(fd1, F_DUPFD)) < 0)
153 if (fcntl(fd2, F_GETFD) != 0)
163 if ((fd2
[all...]
/freebsd-9.3-release/contrib/binutils/libiberty/
H A Dfdmatch.c23 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
52 int fdmatch (int fd1, int fd2) argument
58 (fstat (fd2, &sbuf2) == 0) &&
/freebsd-9.3-release/contrib/gcclibs/libiberty/
H A Dfdmatch.c23 @deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
52 int fdmatch (int fd1, int fd2) argument
58 (fstat (fd2, &sbuf2) == 0) &&
/freebsd-9.3-release/tools/regression/lib/libutil/
H A Dtest-flopen.c99 int fd1, fd2; local
106 fd2 = flopen(fn, O_RDWR|O_NONBLOCK);
107 if (fd2 >= 0) {
109 close(fd2);
125 volatile int fd1, fd2; local
132 fd2 = -42;
134 fd2 = flopen(fn, O_RDWR|O_NONBLOCK);
135 close(fd2);
138 if (fd2 == -42)
140 if (fd2 >
157 volatile int fd1, fd2; local
[all...]
/freebsd-9.3-release/tools/regression/nfsmmap/test1/
H A Dtest1.c8 int fd, fd2; local
40 fd2 = open("test1.scratch", O_RDWR|O_CREAT, 0666);
41 if (fd2 < 0)
44 if (write(fd2, addr, 4096) < 0)
/freebsd-9.3-release/tools/regression/nfsmmap/test2/
H A Dtest2.c8 int fd, fd2; local
38 fd2 = open("test2.scratch", O_RDWR|O_CREAT, 0666);
39 if (fd2 < 0)
42 if (write(fd2, addr, 4096) < 0)
/freebsd-9.3-release/usr.bin/cmp/
H A Dcmp.c67 int ch, fd1, fd2, oflag, special; local
121 fd2 = 0;
124 else if ((fd2 = open(file2, oflag, 0)) < 0 && errno != EMLINK) {
135 if (fd2 == -1) {
142 } else if (fd2 == -1) {
159 if (fstat(fd2, &sb2)) {
171 c_special(fd1, file1, skip1, fd2, file2, skip2);
180 fd2, file2, skip2, sb2.st_size);
H A Dspecial.c49 int fd2, const char *file2, off_t skip2)
58 if ((fp2 = fdopen(fd2, "r")) == NULL)
48 c_special(int fd1, const char *file1, off_t skip1, int fd2, const char *file2, off_t skip2) argument
H A Dregular.c60 int fd2, const char *file2, off_t skip2, off_t len2)
93 c_special(fd1, file1, skip1, fd2, file2, skip2);
97 if ((m2 = remmap(NULL, fd2, off2)) == NULL) {
99 c_special(fd1, file1, skip1, fd2, file2, skip2);
135 if ((p2 = m2 = remmap(m2, fd2, off2)) == NULL) {
59 c_regular(int fd1, const char *file1, off_t skip1, off_t len1, int fd2, const char *file2, off_t skip2, off_t len2) argument
/freebsd-9.3-release/tools/regression/fifo/fifo_misc/
H A Dfifo_misc.c70 cleanfifo(const char *fifoname, int fd1, int fd2) argument
75 if (fd2 != -1)
76 close(fd2);
84 int error, fd1, fd2; local
89 fd2 = open(fifoname, O_WRONLY | O_NONBLOCK);
90 if (fd2 < 0) {
97 *writer_fdp = fd2;
/freebsd-9.3-release/tools/tools/netrate/juggle/
H A Djuggle.c77 * Number of message cycles -- into fd1, out of fd2, into fd2, and out of
248 juggle(int fd1, int fd2, int pipeline) argument
264 if (message_recv(fd2) < 0)
265 err(-1, "message_recv fd2");
267 if (message_send(fd2) < 0)
268 err(-1, "message_send fd2");
301 int fd2, i, j; local
303 fd2 = *(int *)arg;
318 if (message_recv(fd2) <
330 thread_juggle(int fd1, int fd2, int pipeline) argument
389 process_juggle(int fd1, int fd2, int pipeline) argument
498 int fd1, fd2, i, j, p; local
[all...]
/freebsd-9.3-release/tools/regression/sockets/socketpair/
H A Dsocketpair.c52 int fd1, fd2, fd3; local
131 fd2 = dup(STDIN_FILENO);
132 if (fd2 != fd1 + 1) {
151 /* Allocate a file descriptor and make sure it's fd2+1. */
153 if (fd3 != fd2 + 1) {
/freebsd-9.3-release/tools/regression/sockets/accept_fd_leak/
H A Daccept_fd_leak.c67 int fd1, fd2, fd3, i, s; local
76 fd2 = dup(STDIN_FILENO);
77 if (fd2 != fd1 + 1)
117 * Allocate a file descriptor and make sure it's fd2+2. 2 because
121 if (fd3 != fd2 + 2)
122 printf("not ok 1 - (%d, %d, %d)\n", fd1, fd2, fd3);
187 * Allocate a file descriptor and make sure it's fd2+2. 2 because
191 if (fd3 != fd2 + 2)
192 printf("not ok 2 - (%d, %d, %d)\n", fd1, fd2, fd3);
/freebsd-9.3-release/tools/regression/sockets/unix_cmsg/
H A Dunix_cmsg.c438 int fd1, fd2; local
454 fd2 = sync_fd[SYNC_CLIENT][SYNC_SEND];
457 fd2 = sync_fd[SYNC_CLIENT][SYNC_RECV];
459 if (close(fd1) < 0 || close(fd2) < 0) {
1306 int fd2, rv; local
1311 fd2 = -1;
1322 fd2 = socket_accept(fd1);
1323 if (fd2 < 0)
1326 fd2 = fd1;
1333 if (message_recv(fd2,
1399 int fd2, rv, val; local
1545 int fd2, rv, val; local
1664 int fd2, rv; local
1763 int fd2, rv; local
1877 int fd2, rv; local
1937 int fd2, rv; local
[all...]
/freebsd-9.3-release/contrib/ntp/sntp/libevent/test/
H A Dregress_listener.c81 evutil_socket_t fd1 = -1, fd2 = -1, fd3 = -1; local
117 fd1 = fd2 = fd3 = -1;
119 evutil_socket_connect_(&fd2, (struct sockaddr*)&ss1, slen1);
133 if (fd2>=0)
134 EVUTIL_CLOSESOCKET(fd2);
/freebsd-9.3-release/tools/test/upsdl/
H A Dupsdl.c39 int mapBuffer(char** bufferp,int fd1,int fd2);
97 /* mmap a 2 page buffer - first page is from fd1, second page from fd2 */
98 int mapBuffer(char** bufferp,int fd1,int fd2) argument
112 MAP_SHARED, fd2, 0);
/freebsd-9.3-release/tools/regression/security/cap_test/
H A Dcap_test_capmode.c71 int fd_close, fd_dir, fd_file, fd_socket, fd2[2]; local
181 if (pipe(fd2) == 0) {
182 close(fd2[0]);
183 close(fd2[1]);
/freebsd-9.3-release/tools/regression/poll/
H A Dpipepoll.c93 int fd2, res; local
198 fd2 = open(FIFONAME, O_RDONLY | O_NONBLOCK);
199 if (fd2 < 0)
201 pfd.fd = fd2;
209 close(fd2);
H A Dpipeselect.c64 int fd1, fd2; local
191 fd2 = open(FIFONAME, O_RDONLY | O_NONBLOCK);
192 if (fd2 < 0)
195 fd = fd2;
205 close(fd2);
/freebsd-9.3-release/usr.sbin/acpi/acpidb/
H A Dacpidb.c363 int fd, fd2; local
393 fd2 = open(filetmp, O_WRONLY | O_CREAT | O_TRUNC, mode);
394 if (fd2 == -1) {
398 write(fd2, &dummy_dsdt_table, sizeof(ACPI_TABLE_HEADER));
400 write(fd2, code, sb.st_size);
401 close(fd2);
/freebsd-9.3-release/sys/fs/fdescfs/
H A Dfdesc_vnops.c135 struct fdescnode *fd2; local
139 LIST_FOREACH(fd2, fc, fd_hash) {
140 if (fd == fd2) {
158 struct fdescnode *fd, *fd2; local
225 LIST_FOREACH(fd2, fc, fd_hash) {
226 if (fd2->fd_ix == ix && fd2->fd_vnode->v_mount == mp) {
228 vp2 = fd2->fd_vnode;
/freebsd-9.3-release/tools/regression/sockets/zerosend/
H A Dzerosend.c213 int fd1, fd2; local
226 fd2 = open(path, O_WRONLY | O_NONBLOCK);
227 if (fd2 < 0)
230 fdp[0] = fd2;
/freebsd-9.3-release/usr.sbin/sysinstall/
H A Dsystem.c175 int fd2, type; local
178 if ((fd2 = open("/dev/console", O_RDWR)) != -1) {
179 if (ioctl(fd2, CONS_CURSORTYPE, &type) == -1) {
184 close(fd); close(fd2);
188 close(fd2);
/freebsd-9.3-release/tools/regression/sockets/unix_gc/
H A Dunix_gc.c118 close2(int fd1, int fd2) argument
122 close(fd2);
126 close3(int fd1, int fd2, int fd3) argument
129 close2(fd1, fd2);
134 close4(int fd1, int fd2, int fd3, int fd4) argument
137 close2(fd1, fd2);
142 close5(int fd1, int fd2, int fd3, int fd4, int fd5) argument
145 close3(fd1, fd2, fd3);
/freebsd-9.3-release/bin/sh/
H A Dinput.c403 int fd2; local
409 fd2 = fcntl(fd, F_DUPFD, 10);
411 if (fd2 < 0)
413 fd = fd2;

Completed in 116 milliseconds

12