Searched defs:fds (Results 1 - 25 of 83) sorted by relevance

1234

/illumos-gate/usr/src/lib/libbc/libc/sys/common/
H A Ddup.c33 int ret, fds; local
38 if ((fds = fd_get(fd)) != -1)
39 fd_add(ret, fds);
H A Ddup2.c44 int fds; /* duplicate files descriptor */ local
74 if ((fds = fd_get(fildes)) != -1)
75 fd_add(fildes2, fds);
H A Dfdlist.c35 int fds[NUM_FD]; member in struct:fd_lst
50 lst->fds[i] = -1;
58 fd_add(int fd, int fds) argument
69 fdc->fds[i] = fds;
90 fdtail->fds[0] = fds;
105 fdc->fds[i] = -1;
124 return (fdc->fds[i]);
/illumos-gate/usr/src/lib/libc/port/gen/
H A Dpipe.c32 pipe(int *fds) argument
34 return (pipe2(fds, 0));
H A Dpoll.c34 ppoll(struct pollfd *_RESTRICT_KYWD fds, nfds_t nfd, argument
38 return (_pollsys(fds, nfd, tsp, sigmask));
42 poll(struct pollfd *fds, nfds_t nfd, int timeout) argument
55 return (_pollsys(fds, nfd, tsp, NULL));
H A Dclosefrom.c62 int *fds; local
68 fds = alloca(FDS_SZ);
81 fds = memcpy(alloca(fds_sz * 2), fds, fds_sz);
84 fds[nfds++] = i;
99 fds = memcpy(alloca(fds_sz * 2), fds, fds_sz);
102 fds[nfds++] = i;
117 if ((rv = func(cd, fds[i])) != 0)
/illumos-gate/usr/src/cmd/lp/lib/msgs/
H A Dmcreate.c49 int fds[2]; local
52 if (pipe(fds) != 0)
56 if (ioctl(fds[1], I_PUSH, "connld") != 0)
60 if (fattach(fds[1], path) != 0)
70 md->readfd = fds[0];
75 md->writefd = fds[1];
77 md->writefd = fds[0];
78 close(fds[1]);
H A Dmconnect.c106 int fds[2]; local
108 if (pipe(fds) != 0)
111 if (ioctl(fd, I_SENDFD, fds[1]) != 0)
116 fd = fds[0];
117 (void)_Close(fds[1]);
H A Dstreamio.c59 struct pollfd fds; local
61 fds.fd = mdp->writefd;
62 fds.events = POLLOUT;
63 fds.revents = 0;
65 (void) poll(&fds, 1, 1000);
66 if (fds.revents & (POLLHUP | POLLERR | POLLNVAL)) {
71 if (!(fds.revents & POLLOUT)) {
/illumos-gate/usr/src/lib/libgen/common/
H A Dp2open.c53 int fds[2]; local
55 if (__p2open(cmd, fds) == -1)
58 fp[0] = fdopen(fds[0], "w");
59 fp[1] = fdopen(fds[1], "r");
70 __p2open(const char *cmd, int fds[2]) argument
105 fds[0] = tocmd[1];
106 fds[1] = fromcmd[0];
113 int fds[2]; local
119 fds[0] = fdp[0];
120 fds[
[all...]
/illumos-gate/usr/src/lib/libbc/libc/sys/4.2/
H A Dread.c51 int fds, ret, off; local
H A Dreadv.c52 int fds, ret, off; local
H A Dfcntl.c88 int fds, ret; local
155 if ((fds = fd_get(fd)) != -1)
156 fd_add(ret, fds);
/illumos-gate/usr/src/cmd/prstat/
H A Dprfile.h47 typedef struct fds { struct
53 struct fds *fds_next;
/illumos-gate/usr/src/cmd/dtrace/test/tst/common/io/
H A Dtst.fds.c49 int i, n, fds[10]; local
76 * To test the fds[] array, we open /dev/null (a file with reliable
79 fds[n++] = open(file, O_RDONLY);
80 fds[n++] = open(file, O_WRONLY);
81 fds[n++] = open(file, O_RDWR);
83 fds[n++] = open(file, O_RDWR | O_APPEND | O_CREAT | O_DSYNC |
87 fds[n++] = open(file, O_RDWR);
88 (void) lseek(fds[n - 1], 123, SEEK_SET);
93 * our DTrace script into recording the content of the fds[] array.
96 (void) ioctl(fds[
[all...]
/illumos-gate/usr/src/cmd/bnu/
H A Dunknown.c96 int fds[2]; local
114 if ( setuid(getuid()) == -1 || pipe(fds) != 0
115 || write(fds[1], ebuf, strlen(ebuf)) != strlen(ebuf)
116 || close(fds[1]) != 0 )
119 if ( fds[0] != 0 ) {
121 if ( dup(fds[0]) != 0 )
/illumos-gate/usr/src/cmd/ttymon/
H A Dtmpeek.c67 struct pollfd fds[1]; local
77 fds[0].fd = 0;
78 fds[0].events = POLLIN;
86 if ((j = poll(fds,1,-1)) == -1) {
95 if (fds[0].revents & POLLHUP) {
99 if (fds[0].revents & POLLIN) {
100 ptr = do_peek(fds[0].fd, 255);
102 return(process(fds[0].fd,ptr));
/illumos-gate/usr/src/lib/libast/common/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...]
H A Dsfpkrd.c215 int fds[2]; local
219 recv_peek_ok = (!pipe(fds) && write(fds[1], tst, 2) && recv(fds[0], tst, 1, MSG_PEEK) == 1 && tst[0] == 'a' && recv(fds[0], tst, 1, MSG_PEEK) == 1 && tst[0] == 'a') ? 1 : -1;
220 close(fds[0]);
221 close(fds[1]);
/illumos-gate/usr/src/cmd/saf/
H A Dmisc.c79 struct pollfd fds; /* array of fds to poll */ local
96 fds.fd = Cfd;
97 fds.events = POLLIN;
98 fds.revents = 0;
99 if (poll(&fds, 1, 0) < 0)
101 switch (fds.revents) {
/illumos-gate/usr/src/cmd/isns/isnsd/
H A Dserver.c235 struct pollfd fds; local
270 fds.fd = s;
271 fds.events = (POLLIN | POLLRDNORM);
272 fds.revents = 0;
280 poll_ret = poll(&fds, 1, 1000);
/illumos-gate/usr/src/lib/print/libpapi-lpd/common/
H A Dlpd-misc.c128 int ac, rc = -1, fds[2]; local
175 pipe(fds);
177 socketpair(AF_UNIX, SOCK_STREAM, 0, fds);
184 dup2(fds[1], 1);
196 rc = recvfd(fds[0]);
199 close(fds[0]);
200 close(fds[1]);
/illumos-gate/usr/src/lib/libdscfg/common/
H A Dcfg_lockdmsg.c92 struct pollfd fds; local
94 fds.fd = lock_soc;
95 fds.events = POLLIN;
96 fds.revents = 0;
98 rc = poll(&fds, 1, 500);
/illumos-gate/usr/src/lib/libbc/libc/sys/sys5/
H A Dfcntl.c85 int fds, ret; local
150 if ((fds = fd_get(fd)) != -1)
151 fd_add(ret, fds);
/illumos-gate/usr/src/lib/libinstzones/common/
H A Dzones_utils.c151 int *fds; local
172 fds = (int *)a_fds;
174 for (i = 0; fds[i] != -1; i++) {
175 if (fds[i] == a_fd) {

Completed in 174 milliseconds

1234