Searched refs:fd (Results 1 - 25 of 94) sorted by relevance

1234

/PHP_5_5/ext/zip/lib/
H A Dzip_fdopen.c45 int fd;
48 /* We dup() here to avoid messing with the passed in fd.
51 if ((fd=dup(fd_orig)) < 0) {
56 if ((fp=fdopen(fd, "rb")) == NULL) {
57 close(fd);
43 int fd; local
/PHP_5_5/sapi/fpm/fpm/
H A Dfpm_events.h16 int fd; /* not set with FPM_EV_TIMEOUT */ member in struct:fpm_event_s
22 int index; /* index of the fd in the ufds array */
45 int fpm_event_set(struct fpm_event_s *ev, int fd, int flags, void (*callback)(struct fpm_event_s *, short, void *), void *arg);
H A Dfpm_sockets.h31 static inline int fd_set_blocked(int fd, int blocked) /* {{{ */ argument
33 int flags = fcntl(fd, F_GETFL);
44 return fcntl(fd, F_SETFL, flags);
H A Dfastcgi.c50 #define FCGI_LOCK(fd) \
62 #define FCGI_UNLOCK(fd) \
98 # define FCGI_LOCK(fd) \
105 if (fcntl(fd, F_SETLKW, &lock) != -1) { \
112 # define FCGI_UNLOCK(fd) \
121 if (fcntl(fd, F_SETLK, &lock) != -1) { \
130 # define FCGI_LOCK(fd)
131 # define FCGI_UNLOCK(fd)
285 req->fd = -1;
308 ret = write(req->fd, ((cha
[all...]
H A Dfpm_stdio.c28 int fd = open("/dev/null", O_RDWR); local
30 if (0 > fd) {
35 if (0 > dup2(fd, STDIN_FILENO) || 0 > dup2(fd, STDOUT_FILENO)) {
37 close(fd);
40 close(fd);
89 int fd = ev->fd; local
103 is_stdout = (fd == child->fd_stdout);
112 res = read(fd, bu
265 int fd; local
[all...]
/PHP_5_5/win32/
H A Dflock.c55 PHPAPI int flock(int fd, int op) argument
57 HANDLE hdl = (HANDLE) _get_osfhandle(fd);
H A Dflock.h11 PHPAPI int flock(int fd, int op);
/PHP_5_5/ext/gd/libgd/
H A Dgd_gif_in.c91 static int ReadColorMap (gdIOCtx *fd, int number, unsigned char (*buffer)[256]);
92 static int DoExtension (gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP);
93 static int GetDataBlock (gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP);
94 static int GetCode (gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP);
95 static int LWZReadByte (gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP);
97 static void ReadImage (gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256], int interlace, int *ZeroDataBlockP); /*1.4//, int ignore); */
114 gdIOCtx *fd = gdNewFileCtx(fdFile); local
117 im = gdImageCreateFromGifCtx(fd);
119 fd->gd_free(fd);
125 gdImageCreateFromGifCtx(gdIOCtxPtr fd) argument
277 ReadColorMap(gdIOCtx *fd, int number, unsigned char (*buffer)[256]) argument
298 DoExtension(gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP) argument
327 GetDataBlock_(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) argument
346 GetDataBlock(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) argument
370 GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) argument
410 GetCode(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) argument
421 LWZReadByte_(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) argument
535 LWZReadByte(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) argument
546 ReadImage(gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256], int interlace, int *ZeroDataBlockP) argument
[all...]
H A Dxbm.c33 gdImagePtr gdImageCreateFromXbm(FILE * fd) argument
50 rewind(fd);
51 while (fgets(fline, MAX_XBM_LINE_SIZE, fd)) {
108 if ((ch=getc(fd)) == EOF) {
120 if ((ch=getc(fd)) == EOF) {
124 if ((ch=getc(fd)) == EOF) {
129 if ((ch=getc(fd)) == EOF) {
133 if ((ch=getc(fd)) == EOF) {
/PHP_5_5/ext/fileinfo/libmagic/
H A Dcompress.c102 file_zmagic(struct magic_set *ms, int fd, const char *name, argument
120 (nsz = uncompressbuf(ms, fd, i, buf, &newbuf,
154 swrite(int fd, const void *buf, size_t n) argument
160 switch (rv = write(fd, buf, n)) {
179 sread(int fd, void *buf, size_t n, int canbepipe) argument
187 if (fd == STDIN_FILENO)
191 if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) {
200 FD_SET(fd, &check);
206 selrv = select(fd + 1, &check, NULL, NULL, &tout);
216 (void)ioctl(fd, FIONREA
244 file_pipe2file(struct magic_set *ms, int fd, const void *startbuf, size_t nbytes) argument
386 uncompressbuf(struct magic_set *ms, int fd, size_t method, const unsigned char *old, unsigned char **newch, size_t n) argument
[all...]
H A Delfclass.h39 if (dophn_core(ms, clazz, swap, fd,
49 if (dophn_exec(ms, clazz, swap, fd,
58 if (doshn(ms, clazz, swap, fd,
/PHP_5_5/ext/standard/
H A Dflock_compat.c41 PHPAPI int flock(int fd, int operation) argument
43 return php_flock(fd, operation);
47 PHPAPI int php_flock(int fd, int operation) argument
67 ret = fcntl(fd, operation & LOCK_NB ? F_SETLK : F_SETLKW, &flck);
124 HANDLE hdl = (HANDLE) _get_osfhandle(fd);
H A Dflock_compat.h28 PHPAPI int php_flock(int fd, int operation);
35 PHPAPI int flock(int fd, int operation);
H A Dphp_fopen_wrapper.c162 int fd = -1; local
224 fd = STDIN_FILENO;
226 fd = dup(fd);
232 fd = dup(STDIN_FILENO);
237 fd = STDOUT_FILENO;
239 fd = dup(fd);
245 fd = dup(STDOUT_FILENO);
250 fd
[all...]
/PHP_5_5/main/
H A Dphp_network.h116 php_socket_t fd; member in struct:_php_pollfd
129 # define POLLNVAL 0x0020 /* Invalid request: fd not open */
156 static inline int php_pollfd_for(php_socket_t fd, int events, struct timeval *timeouttv) argument
161 p.fd = fd;
174 static inline int php_pollfd_for_ms(php_socket_t fd, int events, int timeout) argument
179 p.fd = fd;
196 /* it is safe to FD_SET too many fd's under win32; the macro will simply ignore
198 # define PHP_SAFE_FD_SET(fd, se
[all...]
H A Dphp_open_temporary_file.c103 int fd = -1; local
157 fd = VCWD_OPEN_MODE(opened_path, open_flags, 0600);
161 fd = mkstemp(opened_path);
164 fd = VCWD_OPEN(opened_path, open_flags);
168 if (fd == -1 || !opened_path_p) {
174 return fd;
269 int fd; local
291 fd = php_do_open_temporary_file(dir, pfx, opened_path_p TSRMLS_CC);
292 if (fd == -1) {
296 return fd;
307 int fd = php_open_temporary_fd(dir, pfx, opened_path_p TSRMLS_CC); local
[all...]
/PHP_5_5/main/streams/
H A Dphp_stream_plain_wrapper.h39 PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC);
40 #define php_stream_fopen_from_fd(fd, mode, persistent_id) _php_stream_fopen_from_fd((fd), (mode), (persistent_id) STREAMS_CC TSRMLS_CC)
H A Dplain_wrapper.c46 #define php_stream_fopen_from_fd_int(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_CC TSRMLS_CC)
47 #define php_stream_fopen_from_fd_int_rel(fd, mode, persistent_id) _php_stream_fopen_from_fd_int((fd), (mode), (persistent_id) STREAMS_REL_CC TSRMLS_CC)
113 int fd; /* underlying file descriptor */ member in struct:__anon320
137 #define PHP_STDIOP_GET_FD(anfd, data) anfd = (data)->file ? fileno((data)->file) : (data)->fd
142 int fd; local
145 PHP_STDIOP_GET_FD(fd, d);
146 r = fstat(fd, &d->sb);
154 static php_stream *_php_stream_fopen_from_fd_int(int fd, cons argument
188 int fd = php_open_temporary_fd(dir, pfx, opened_path TSRMLS_CC); local
207 int fd = php_open_temporary_fd(NULL, "php", &opened_path TSRMLS_CC); local
230 _php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC) argument
485 int fd; local
557 int fd; local
899 int fd; local
[all...]
/PHP_5_5/sapi/apache/
H A Dsapi_apache.c48 file_handle.handle.fd = 0;
/PHP_5_5/sapi/fpm/fpm/events/
H A Ddevpoll.c96 /* set all fd to -1 in order to ensure it's not set */
98 pollfds[i].fd = -1;
179 if (q->ev && q->ev->fd == active_pollfds[i].fd) {
199 * Add a FD from the fd set
206 pollfd.fd = ev->fd;
217 ev->index = ev->fd;
224 * Remove a FD from the fd set
231 pollfd.fd
[all...]
H A Dpoll.c88 /* set all fd to -1 in order to ensure it's not set */
90 pollfds[i].fd = -1;
161 if (q->ev && q->ev->index >= 0 && q->ev->index < npollfds && q->ev->fd == active_pollfds[q->ev->index].fd) {
184 * Add a FD to the fd set
191 if (pollfds[next_free_slot].fd == -1) {
193 pollfds[next_free_slot].fd = ev->fd;
196 /* remember the event place in the fd list and suppose next slot is free */
206 if (pollfds[i].fd !
[all...]
H A Dselect.c120 if (FD_ISSET(q->ev->fd, &current_fds)) {
140 * Add a FD to the fd set
145 if (ev->fd >= FD_SETSIZE) {
146 zlog(ZLOG_ERROR, "select: not enough space in the select fd list (max = %d). Please consider using another event mechanism.", FD_SETSIZE);
151 if (!FD_ISSET(ev->fd, &fds)) {
152 FD_SET(ev->fd, &fds);
153 ev->index = ev->fd;
161 * Remove a FD from the fd set
165 /* remove the fd if it's in */
166 if (FD_ISSET(ev->fd,
[all...]
H A Depoll.c160 * Add a FD to the fd set
168 e.data.fd = ev->fd;
176 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, ev->fd, &e) == -1) {
177 zlog(ZLOG_ERROR, "epoll: unable to add fd %d", ev->fd);
182 ev->index = ev->fd;
188 * Remove a FD from the fd set
196 e.data.fd = ev->fd;
[all...]
/PHP_5_5/sapi/thttpd/
H A Dphp_thttpd.h31 void thttpd_closed_conn(int fd);
/PHP_5_5/ext/session/
H A Dmod_files.c60 int fd; member in struct:__anon1
110 if (data->fd != -1) {
114 flock(data->fd, LOCK_UN);
116 close(data->fd);
117 data->fd = -1;
126 if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) {
147 data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);
154 data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY, data->filemode);
157 if (data->fd != -1) {
161 if (fstat(data->fd,
[all...]

Completed in 32 milliseconds

1234