Searched defs:fd (Results 1 - 25 of 64) 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_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_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_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.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);
348 zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, inherited);
493 int fd; local
499 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
503 if (connect(fd, (struct sockaddr *)sock, socklen) == -1) {
504 close(fd);
508 close(fd);
[all...]
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)) {
/PHP_TRUNK/win32/
H A Dflock.c55 PHPAPI int flock(int fd, int op) argument
57 HANDLE hdl = (HANDLE) _get_osfhandle(fd);
/PHP_TRUNK/ext/zip/lib/
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...]
H A Dreadcdf.c318 file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf, argument
331 info.i_fd = fd;
H A Dfuncs.c223 php_socket_t fd; local
224 if (stream && SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **)&fd, 0)) {
225 if ((m = file_trycdf(ms, fd, ubuf, nb)) != 0) {
241 nb > 5 && fd != -1) {
251 if ((m = file_tryelf(ms, fd, ubuf, nb)) != 0)
H A Dmagic.c288 close_and_restore(const struct magic_set *ms, const char *name, int fd, argument
322 magic_descriptor(struct magic_set *ms, int fd) argument
/PHP_TRUNK/TSRM/
H A Dtsrm_nw.c229 NXHandle_t fd = 0; local
232 fd = fileno(stream);
233 NXClose (fd);
/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/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 Dpassword.c135 int fd, n; local
137 fd = open("/dev/urandom", O_RDONLY);
138 if (fd >= 0) {
140 n = read(fd, buffer + read_bytes, raw_length - read_bytes);
146 close(fd);
/PHP_TRUNK/Zend/
H A Dzend_stream.h67 int fd; member in union:_zend_file_handle::__anon15
/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/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/ext/session/
H A Dmod_files.c66 int fd; member in struct:__anon191
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/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/main/
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);
292 if (fd == -1) {
296 return fd;
307 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_sigio_win32.h29 int fd; member in struct:win32_sigio_watcher_data

Completed in 27 milliseconds

123