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

12345

/PHP_TRUNK/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_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...]
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);
/PHP_TRUNK/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_TRUNK/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_TRUNK/ext/zip/lib/
H A Dmkstemp.c66 int fd;
130 if ((fd=open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0)
131 return (fd);
H A Dzip_fdopen.c45 int fd;
61 /* We dup() here to avoid messing with the passed in fd.
64 if ((fd=dup(fd_orig)) < 0) {
69 if ((fp=fdopen(fd, "rb")) == NULL) {
70 close(fd);
43 int fd; local
/PHP_TRUNK/ext/fileinfo/libmagic/
H A Dcompress.c103 file_zmagic(struct magic_set *ms, int fd, const char *name, argument
121 (nsz = uncompressbuf(ms, fd, i, buf, &newbuf,
153 swrite(int fd, const void *buf, size_t n) argument
159 switch (rv = write(fd, buf, n)) {
178 sread(int fd, void *buf, size_t n, int canbepipe) argument
186 if (fd == STDIN_FILENO)
190 if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) {
199 FD_SET(fd, &check);
205 selrv = select(fd + 1, &check, NULL, NULL, &tout);
215 (void)ioctl(fd, FIONREA
243 file_pipe2file(struct magic_set *ms, int fd, const void *startbuf, size_t nbytes) argument
385 uncompressbuf(struct magic_set *ms, int fd, size_t method, const unsigned char *old, unsigned char **newch, size_t n) argument
[all...]
/PHP_TRUNK/ext/session/
H A Dmod_files.c66 int fd; member in struct:__anon192
110 if (data->fd != -1) {
114 flock(data->fd, LOCK_UN);
116 close(data->fd);
117 data->fd = -1;
128 if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) {
149 data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);
156 data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY, data->filemode);
159 if (data->fd != -1) {
163 if (fstat(data->fd,
[all...]
/PHP_TRUNK/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.c177 int fd = -1; local
250 fd = STDIN_FILENO;
252 fd = dup(fd);
258 fd = dup(STDIN_FILENO);
263 fd = STDOUT_FILENO;
265 fd = dup(fd);
271 fd = dup(STDOUT_FILENO);
276 fd
[all...]
/PHP_TRUNK/main/
H A Dphp_network.h122 php_socket_t fd; member in struct:_php_pollfd
135 # define POLLNVAL 0x0020 /* Invalid request: fd not open */
162 static inline int php_pollfd_for(php_socket_t fd, int events, struct timeval *timeouttv) argument
167 p.fd = fd;
180 static inline int php_pollfd_for_ms(php_socket_t fd, int events, int timeout) argument
185 p.fd = fd;
202 /* it is safe to FD_SET too many fd's under win32; the macro will simply ignore
204 # 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_TRUNK/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 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...]
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...]
/PHP_TRUNK/sapi/thttpd/
H A Dphp_thttpd.h31 void thttpd_closed_conn(int fd);
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_out.h38 PHPDBG_API int phpdbg_print(int severity TSRMLS_DC, int fd, const char *tag, const char *xmlfmt, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 6, 7);
39 PHPDBG_API int phpdbg_xml_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
40 PHPDBG_API int phpdbg_log_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
41 PHPDBG_API int phpdbg_out_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
42 PHPDBG_API int phpdbg_rlog_internal(int fd TSRMLS_DC, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
44 PHPDBG_API int phpdbg_print(int severity, int fd, const char *tag, const char *xmlfmt, const char *strfmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 5, 6);
45 PHPDBG_API int phpdbg_xml_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
46 PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
47 PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
48 PHPDBG_API int phpdbg_rlog_internal(int fd, cons
[all...]
H A Dphpdbg_sigio_win32.c39 (void)phpdbg_consume_bytes(swd->fd, &sig, 1, -1 TSRMLS_CC);
77 PHPDBG_G(swd).fd = PHPDBG_G(io)[PHPDBG_STDIN].fd;
114 PHPDBG_G(swd).fd = -1;
H A Dphpdbg_sigio_win32.h31 int fd; member in struct:win32_sigio_watcher_data
/PHP_TRUNK/main/streams/
H A Dplain_wrapper.c47 #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)
48 #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)
120 int fd; /* underlying file descriptor */ member in struct:__anon11
144 #define PHP_STDIOP_GET_FD(anfd, data) anfd = (data)->file ? fileno((data)->file) : (data)->fd
149 int fd; local
152 PHP_STDIOP_GET_FD(fd, d);
153 r = zend_fstat(fd, &d->sb);
161 static php_stream *_php_stream_fopen_from_fd_int(int fd, cons argument
196 int fd; local
231 _php_stream_fopen_from_fd(int fd, const char *mode, const char *persistent_id STREAMS_DC TSRMLS_DC) argument
518 php_socket_t fd; local
590 int fd; local
932 int fd; local
[all...]

Completed in 56 milliseconds

12345