Searched defs:fd (Results 1 - 25 of 59) sorted by relevance

123

/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);
H A Dfpm_events.c60 int fd = ev->fd; local
64 res = read(fd, &c, 1);
169 /* ask the event module to add the fd from its own queue */
200 /* ask the event module to remove the fd from its own queue */
471 int fpm_event_set(struct fpm_event_s *ev, int fd, int flags, void (*callback)(struct fpm_event_s *, short, void *), void *arg) /* {{{ */ argument
473 if (!ev || !callback || fd < -1) {
477 ev->fd = fd;
H A Dfpm_log.c38 int fd; local
45 fd = open(wp->config->access_log, O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR);
46 if (0 > fd) {
54 dup2(fd, wp->log_fd);
55 close(fd);
56 fd = wp->log_fd;
59 wp->log_fd = fd;
62 if (0 > fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC)) {
H A Dfpm_sockets.c55 char fd[32]; local
56 sprintf(fd, "%d", ls->sock);
57 env_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + 1);
58 p += sprintf(env_value + p, "%s%s=%s", p ? "," : "", ls->key, fd);
349 zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, inherited);
494 int fd; local
500 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
504 if (connect(fd, (struct sockaddr *)sock, socklen) == -1) {
505 close(fd);
509 close(fd);
[all...]
/PHP_TRUNK/TSRM/
H A Dtsrm_nw.c229 NXHandle_t fd = 0; local
232 fd = fileno(stream);
233 NXClose (fd);
/PHP_TRUNK/ext/dba/
H A Ddba_cdb.c233 int cdb_file_lseek(int fd, off_t offset, int whence) { argument
234 return lseek(fd, offset, whence);
H A Ddba_dbm.c48 if((fd = VCWD_OPEN_MODE(buf, O_CREAT | mode | O_WRONLY, filemode)) == -1) \
50 close(fd);
59 int fd; local
/PHP_TRUNK/ext/gd/libgd/
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/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/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 Dphp_random.h31 int fd; member in struct:__anon1
/PHP_TRUNK/Zend/
H A Dzend_stream.h67 int fd; member in union:_zend_file_handle::__anon8
/PHP_TRUNK/ext/zlib/
H A Dzlib_fopen_wrapper.c136 php_socket_t fd; local
138 if (SUCCESS == php_stream_cast(innerstream, PHP_STREAM_AS_FD, (void **) &fd, REPORT_ERRORS)) {
141 self->gz_file = gzdopen(dup(fd), mode);
/PHP_TRUNK/ext/fileinfo/libmagic/
H A Dmagic.c290 close_and_restore(const struct magic_set *ms, const char *name, int fd, argument
324 magic_descriptor(struct magic_set *ms, int fd) argument
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...]
H A Dreadcdf.c441 file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf, argument
453 info.i_fd = fd;
/PHP_TRUNK/ext/ftp/
H A Dftp.h49 php_socket_t fd; /* data connection */ member in struct:databuf
60 php_socket_t fd; /* control connection */ member in struct:ftpbuf
/PHP_TRUNK/sapi/phpdbg/
H A Dphpdbg_sigio_win32.h29 int fd; member in struct:win32_sigio_watcher_data
H A Dphpdbg_io.c88 } while ((bytes = phpdbg_mixed_read(PHPDBG_G(io)[PHPDBG_STDIN].fd, buf + len, PHPDBG_MAX_CMD - len, -1)) > 0);
105 pfd.fd = sock;
152 quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, ZEND_STRL("Read operation timed out!\n"));
205 int fd = phpdbg_create_listenable_socket(interface, port, &res); local
207 if (fd == -1) {
211 if (bind(fd, res.ai_addr, res.ai_addrlen) == -1) {
212 phpdbg_close_socket(fd);
216 listen(fd, 5);
218 return fd;
273 quiet_write(PHPDBG_G(io)[PHPDBG_STDERR].fd, bu
[all...]
/PHP_TRUNK/ext/zip/lib/
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);
/PHP_TRUNK/ext/mcrypt/
H A Dphp_mcrypt.h83 int fd[2]; // RANDOM = 0, URANDOM = 1 variable
/PHP_TRUNK/ext/session/
H A Dmod_files.c100 int fd; member in struct:__anon36
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...]

Completed in 51 milliseconds

123