Searched refs:fds (Results 1 - 25 of 132) sorted by relevance

123456

/macosx-10.9.5/postfix-252/postfix/src/util/
H A Dduplex_pipe.c9 /* int duplex_pipe(fds)
10 /* int *fds;
41 int duplex_pipe(int *fds) argument
44 return (pipe(fds));
46 return (sane_socketpair(AF_UNIX, SOCK_STREAM, 0, fds));
/macosx-10.9.5/dtrace-118.1/test/tst/common/io/
H A Dtst.fds.d27 #pragma ident "@(#)tst.fds.d 1.1 06/08/28 SMI"
35 raise(SIGUSR1); /* kick tst.fds.c out of its busy-wait loop */
41 printf("fds[%d] fi_name = %s\n", arg0, fds[arg0].fi_name);
42 printf("fds[%d] fi_dirname = %s\n", arg0, fds[arg0].fi_dirname);
43 printf("fds[%d] fi_pathname = %s\n", arg0, fds[arg0].fi_pathname);
44 printf("fds[%d] fi_fs = %s\n", arg0, fds[arg
[all...]
H A Dtst.fds.c27 #pragma ident "@(#)tst.fds.c 1.1 06/08/28 SMI"
53 int i, n, fds[10]; local
85 * To test the fds[] array, we open /dev/null (a file with reliable
88 fds[n++] = open(file, O_RDONLY);
89 fds[n++] = open(file, O_WRONLY);
90 fds[n++] = open(file, O_RDWR);
93 fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC |
97 fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_ASYNC |
101 fds[n++] = open(file, O_RDWR);
102 (void) lseek(fds[
[all...]
/macosx-10.9.5/OpenSSH-186/openssh/openbsd-compat/regress/
H A Dclosefromtest.c39 int i, max, fds[NUM_OPENS]; local
43 if ((fds[i] = open("/dev/null", O_RDONLY)) == -1)
48 closefrom(fds[max]);
49 if (close(fds[max]) != -1)
54 if (read(fds[i], buf, sizeof(buf)) == -1)
57 /* should close all fds */
58 closefrom(fds[0]);
60 if (close(fds[i]) != -1)
/macosx-10.9.5/cups-372.4/cups/scheduler/
H A Dfile.c167 cupsdClosePipe(int *fds) /* I - Pipe file descriptors (2) */ argument
173 if (fds[0] >= 0)
175 close(fds[0]);
176 fds[0] = -1;
179 if (fds[1] >= 0)
181 close(fds[1]);
182 fds[1] = -1;
262 cupsdOpenPipe(int *fds) /* O - Pipe file descriptors (2) */ argument
268 if (pipe(fds))
270 fds[
[all...]
H A Dutil.c257 fds[2]; /* Pipe file descriptors */ local
264 if (pipe(fds))
274 if (fcntl(fds[0], F_SETFD, fcntl(fds[0], F_GETFD) | FD_CLOEXEC))
276 close(fds[0]);
277 close(fds[1]);
284 if (fcntl(fds[1], F_SETFD, fcntl(fds[1], F_GETFD) | FD_CLOEXEC))
286 close(fds[0]);
287 close(fds[
[all...]
/macosx-10.9.5/Heimdal-323.92.1/lib/roken/
H A Dmini_inetd.c94 rk_socket_t *fds; local
106 fds = malloc (nalloc * sizeof(*fds));
107 if (fds == NULL) {
115 fds[i] = socket (a->ai_family, a->ai_socktype, a->ai_protocol);
116 if (rk_IS_BAD_SOCKET(fds[i]))
118 socket_set_nopipe(fds[i], 1);
119 socket_set_reuseaddr (fds[i], 1);
120 socket_set_ipv6only(fds[i], 1);
121 if (rk_IS_SOCKET_ERROR(bind (fds[
[all...]
/macosx-10.9.5/xnu-2422.115.4/tools/tests/libMicro/
H A Dselect.c49 static int *fds; variable
63 " [-n fds-per-thread (default %d)]\n"
64 " [-r readable-fds (default 0)]\n"
65 " [-w writeable-fds (default 0)]\n"
123 fds = (int *)malloc(optn * sizeof (int));
124 if (fds == NULL) {
143 fds[i] = MIN(pair[0], pair[1]);
144 fds[i+1] = MAX(pair[0], pair[1]);
145 maxfd = fds[i+1] + 1;
152 FD_SET(fds[
[all...]
H A Dpoll.c49 static int *fds; variable
67 " [-n fds-per-thread (default %d)]\n"
68 " [-r readable-fds (default 0)]\n"
69 " [-w writeable-fds (default 0)]\n"
127 fds = (int *)malloc(optn * sizeof (int));
128 if (fds == NULL) {
143 fds[i] = MIN(pair[0], pair[1]);
144 fds[i+1] = MAX(pair[0], pair[1]);
150 (void) write(fds[j+1 - (2*(j%2))], "", 1);
155 (void) write(fds[
[all...]
/macosx-10.9.5/xnu-2422.115.4/tools/tests/perf_index/
H A Dstress_file_write.c7 static int *fds = NULL; variable
14 if(fds == NULL)
15 fds = (int*)malloc(sizeof(int)*num_threads);
18 fds[i] = open(filepath, O_CREAT | O_EXCL | O_WRONLY, 0644);
19 assert(fds[i] > 0);
29 int fd = fds[thread_id];
/macosx-10.9.5/OpenSSH-186/openssh/openbsd-compat/
H A Dbsd-poll.c40 poll(struct pollfd *fds, nfds_t nfds, int timeout) argument
49 fd = fds[i].fd;
68 fd = fds[i].fd;
71 if (fds[i].events & POLLIN) {
75 if (fds[i].events & POLLOUT) {
93 fd = fds[i].fd;
94 fds[i].revents = 0;
98 fds[i].revents |= POLLIN;
101 fds[i].revents |= POLLOUT;
104 fds[
[all...]
/macosx-10.9.5/apache-786.1/httpd/srclib/apr/network_io/os2/
H A Dsendrecv.c28 int fds, err = 0; local
36 fds = sock->socketdes;
37 rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout/1000 : -1);
72 int fds, err = 0; local
76 fds = sock->socketdes;
77 rv = select(&fds, 1, 0, 0, sock->timeout >= 0 ? sock->timeout/1000 : -1);
114 int fds, err = 0; local
127 fds = sock->socketdes;
128 rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout/1000 : -1);
/macosx-10.9.5/apr-30/apr/apr/network_io/os2/
H A Dsendrecv.c28 int fds, err = 0; local
36 fds = sock->socketdes;
37 rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout/1000 : -1);
72 int fds, err = 0; local
76 fds = sock->socketdes;
77 rv = select(&fds, 1, 0, 0, sock->timeout >= 0 ? sock->timeout/1000 : -1);
114 int fds, err = 0; local
127 fds = sock->socketdes;
128 rv = select(&fds, 0, 1, 0, sock->timeout >= 0 ? sock->timeout/1000 : -1);
/macosx-10.9.5/bash-92/bash-3.2/lib/readline/examples/
H A Dexcallback.c100 fd_set fds; local
124 FD_ZERO(&fds);
125 FD_SET(fileno(stdin), &fds); local
127 if( select(FD_SETSIZE, &fds, NULL, NULL, NULL) < 0) {
132 if( FD_ISSET(fileno(stdin), &fds) ) {
/macosx-10.9.5/ruby-104/ruby/missing/
H A Ddup2.c45 int i, fd, fds[256];
50 fd = fds[i] = dup(fd1);
54 close(fds[i--]);
/macosx-10.9.5/Security-55471.14.18/include/security_utilities/
H A Dfdmover.cpp75 size_t FdMover::send(const void *data, size_t length, const FdVector &fds) argument
77 auto_ptr<Element> elem(new (fds.size() * sizeof(int)) Element (SOL_SOCKET, SCM_RIGHTS));
78 copy(fds.begin(), fds.end(), &elem.get()->payload<int>());
87 size_t FdMover::receive(void *data, size_t length, FdVector &fds) argument
98 swap(fds, result);
/macosx-10.9.5/Security-55471.14.18/libsecurity_utilities/lib/
H A Dfdmover.cpp75 size_t FdMover::send(const void *data, size_t length, const FdVector &fds) argument
77 auto_ptr<Element> elem(new (fds.size() * sizeof(int)) Element (SOL_SOCKET, SCM_RIGHTS));
78 copy(fds.begin(), fds.end(), &elem.get()->payload<int>());
87 size_t FdMover::receive(void *data, size_t length, FdVector &fds) argument
98 swap(fds, result);
/macosx-10.9.5/ruby-104/ruby/ext/-test-/old_thread_select/
H A Dold_thread_select.c5 static fd_set * array2fdset(fd_set *fds, VALUE ary, int *max) argument
12 FD_ZERO(fds);
22 FD_SET(fd, fds);
25 return fds;
28 static void fdset2array(VALUE dst, fd_set *fds, int max) argument
35 if (FD_ISSET(i, fds))
/macosx-10.9.5/libarchive-29/libarchive/libarchive/
H A Dfilter_fork.c125 struct pollfd fds[2]; local
130 fds[idx].fd = in;
131 fds[idx].events = POLLOUT;
135 fds[idx].fd = out;
136 fds[idx].events = POLLIN;
140 poll(fds, idx, -1); /* -1 == INFTIM, wait forever */
/macosx-10.9.5/ksh-20/ksh/src/lib/libast/sfio/
H A Dsfpoll.c101 { struct pollfd* fds; local
109 if(!(fds = (struct pollfd*)malloc(m*sizeof(struct pollfd))) )
115 fds[m].fd = f->file;
116 fds[m].events = fds[m].revents = 0;
119 fds[m].events |= POLLOUT;
125 fds[m].fd = f->proc->file;
126 fds[m].revents = 0;
129 fds[m].events |= POLLIN;
133 while((np = SFPOLL(fds,
[all...]
/macosx-10.9.5/rsync-42/rsync/support/
H A Dsavetransfer.c40 fd_set fds; local
79 FD_ZERO(&fds);
80 FD_SET(STDIN_FILENO, &fds);
83 if (!select(STDIN_FILENO+1, &fds, NULL, NULL, &tv))
85 if (!FD_ISSET(STDIN_FILENO, &fds))
/macosx-10.9.5/tcl-102/tcl_ext/tkimg/tkimg/compat/libtiff/contrib/mfs/
H A Dmfs_file.c67 static long fds[MAX_BUFFS]; /* File descriptor status */ variable
136 if (fds[i] == -1)
220 fds[ret] = 0;
247 if (fds[fd] == -1) /* Not open */
331 if (fds[fd] == -1 || buf_mode[fd] != 'r')
371 if (fds[fd] == -1 || buf_mode[fd] == 'r')
429 if (fds[fd] == -1) /* Not open */
460 if (fds[fd] == -1) /* Not open */
511 if (fds[fd] == -1) /* Not open */
518 fds[f
[all...]
/macosx-10.9.5/Heimdal-323.92.1/appl/popper/
H A Dpop_debug.c44 fd_set fds; local
46 FD_ZERO(&fds);
47 FD_SET(0, &fds);
48 FD_SET(s, &fds);
49 if(select(s+1, &fds, 0, 0, 0) < 0)
51 if(FD_ISSET(0, &fds)){
57 if(FD_ISSET(s, &fds)){
/macosx-10.9.5/ncurses-42/ncurses/ncurses/tty/
H A Dlib_twait.c165 struct pollfd *fds = fd_list; local
205 fds = typeMalloc(struct pollfd, MIN_FDS + evl->count);
209 fds[count].fd = sp->_ifd;
210 fds[count].events = POLLIN;
215 fds[count].fd = fd;
216 fds[count].events = POLLIN;
226 fds[count].fd = ev->data.fev.fd;
227 fds[count].events = POLLIN;
234 result = poll(fds, (unsigned) count, milliseconds);
250 if (fds[
[all...]
/macosx-10.9.5/OpenLDAP-491.1/OpenLDAP/libraries/liblber/
H A Dstdio.c49 int fds[2], res; local
53 if (pipe( fds )) return -1;
55 f = fdopen( fds[1], "w" );
57 close( fds[1] );
58 close( fds[0] );
63 close( fds[0] );

Completed in 173 milliseconds

123456