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

1234

/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);
113 int fd = ev->fd; local
127 is_stdout = (fd == child->fd_stdout);
136 res = read(fd, bu
289 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/ext/gd/libgd/
H A Dgd_gif_in.c93 static int ReadColorMap (gdIOCtx *fd, int number, unsigned char (*buffer)[256]);
94 static int DoExtension (gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP);
95 static int GetDataBlock (gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP);
96 static int GetCode (gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP);
97 static int LWZReadByte (gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP);
99 static void ReadImage (gdImagePtr im, gdIOCtx *fd, int len, int height, unsigned char (*cmap)[256], int interlace, int *ZeroDataBlockP); /*1.4//, int ignore); */
116 gdIOCtx *fd = gdNewFileCtx(fdFile); local
119 im = gdImageCreateFromGifCtx(fd);
121 fd->gd_free(fd);
127 gdImageCreateFromGifCtx(gdIOCtxPtr fd) argument
279 ReadColorMap(gdIOCtx *fd, int number, unsigned char (*buffer)[256]) argument
300 DoExtension(gdIOCtx *fd, int label, int *Transparent, int *ZeroDataBlockP) argument
329 GetDataBlock_(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) argument
348 GetDataBlock(gdIOCtx *fd, unsigned char *buf, int *ZeroDataBlockP) argument
372 GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) argument
417 GetCode(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) argument
428 LWZReadByte_(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) argument
542 LWZReadByte(gdIOCtx *fd, LZW_STATIC_DATA *sd, char flag, int input_code_size, int *ZeroDataBlockP) argument
553 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/standard/
H A Dflock_compat.h28 PHPAPI int php_flock(int fd, int operation);
35 PHPAPI int flock(int fd, int operation);
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 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...]
H A Dphp_random.h31 int fd; member in struct:__anon1
H A Drandom.c41 random_globals_p->fd = -1;
46 if (random_globals_p->fd > 0) {
47 close(random_globals_p->fd);
48 random_globals_p->fd = -1;
88 int fd = RANDOM_G(fd);
91 if (fd < 0) {
93 fd = open("/dev/arandom", O_RDONLY);
95 fd = open("/dev/urandom", O_RDONLY);
97 if (fd <
[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 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
172 e.data.fd = ev->fd;
180 if (epoll_ctl(epollfd, EPOLL_CTL_ADD, ev->fd, &e) == -1) {
181 zlog(ZLOG_ERROR, "epoll: unable to add fd %d", ev->fd);
186 ev->index = ev->fd;
192 * Remove a FD from the fd set
200 e.data.fd = ev->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
155 fd = VCWD_OPEN_MODE(opened_path, open_flags, 0600);
159 fd = mkstemp(opened_path);
162 fd = VCWD_OPEN(opened_path, open_flags);
166 if (fd != -1 && opened_path_p) {
170 return fd;
254 int fd; local
276 fd = php_do_open_temporary_file(dir, pfx, opened_path_p);
277 if (fd == -1) {
281 return fd;
292 int fd = php_open_temporary_fd(dir, pfx, opened_path_p); local
[all...]
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_io.c88 } while ((bytes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD - len, -1)) > 0);
106 pfd.fd = sock;
153 write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n"));
200 int fd = phpdbg_create_listenable_socket(interface, port, &res); local
202 if (fd == -1) {
206 if (bind(fd, res.ai_addr, res.ai_addrlen) == -1) {
207 phpdbg_close_socket(fd);
211 listen(fd, 5);
213 return fd;
268 write(PHPDBG_G(io)[PHPDBG_STDERR].fd, bu
[all...]
H A Dphpdbg_out.h38 PHPDBG_API int phpdbg_print(int severity, 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, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
40 PHPDBG_API int phpdbg_log_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
41 PHPDBG_API int phpdbg_out_internal(int fd, const char *fmt, ...) PHP_ATTRIBUTE_FORMAT(printf, 3, 4);
42 PHPDBG_API int phpdbg_rlog_internal(int fd, 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.c36 (void)phpdbg_consume_bytes(swd->fd, &sig, 1, -1);
73 PHPDBG_G(swd).fd = PHPDBG_G(io)[PHPDBG_STDIN].fd;
109 PHPDBG_G(swd).fd = -1;
H A Dphpdbg_sigio_win32.h29 int fd; member in struct:win32_sigio_watcher_data
/PHP_TRUNK/ext/fileinfo/libmagic/
H A Dcompress.c108 file_zmagic(struct magic_set *ms, int fd, const char *name, argument
129 (nsz = uncompressbuf(ms, fd, i, buf, &newbuf,
164 swrite(int fd, const void *buf, size_t n) argument
170 switch (rv = write(fd, buf, n)) {
189 sread(int fd, void *buf, size_t n, int canbepipe) argument
197 if (fd == STDIN_FILENO)
201 if (canbepipe && (ioctl(fd, FIONREAD, &t) == -1 || t == 0)) {
210 FD_SET(fd, &check);
216 selrv = select(fd + 1, &check, NULL, NULL, &tout);
226 (void)ioctl(fd, FIONREA
254 file_pipe2file(struct magic_set *ms, int fd, const void *startbuf, size_t nbytes) argument
396 uncompressbuf(struct magic_set *ms, int fd, size_t method, const unsigned char *old, unsigned char **newch, size_t n) argument
[all...]
/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)
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)
120 int fd; /* underlying file descriptor */ member in struct:__anon1
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) argument
518 php_socket_t fd; local
591 int fd; local
935 int fd; local
[all...]
/PHP_TRUNK/ext/session/
H A Dmod_files.c100 int fd; member in struct:__anon1
145 if (data->fd != -1) {
149 flock(data->fd, LOCK_UN);
151 close(data->fd);
152 data->fd = -1;
164 if (data->fd < 0 || !data->lastkey || strcmp(key, data->lastkey)) {
185 data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY | O_NOFOLLOW, data->filemode);
192 data->fd = VCWD_OPEN_MODE(buf, O_CREAT | O_RDWR | O_BINARY, data->filemode);
195 if (data->fd != -1) {
199 if (fstat(data->fd,
[all...]
/PHP_TRUNK/ext/zip/lib/
H A Dmkstemp.c64 int fd;
128 if ((fd=open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0)
129 return (fd);
H A Dzip_fdopen.c41 int fd; local
52 /* We dup() here to avoid messing with the passed in fd.
55 if ((fd=dup(fd_orig)) < 0) {
60 if ((fp=fdopen(fd, "rb")) == NULL) {
61 close(fd);

Completed in 94 milliseconds

1234