Searched defs:fd (Results 1 - 25 of 58) 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_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) {
52 dup2(fd, wp->log_fd);
53 close(fd);
54 fd = wp->log_fd;
57 wp->log_fd = fd;
60 if (0 > fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC)) {
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_sockets.c78 char fd[32]; local
79 sprintf(fd, "%d", ls->sock);
80 env_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + 1);
81 p += sprintf(env_value + p, "%s%s=%s", p ? "," : "", ls->key, fd);
334 zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, inherited);
479 int fd; local
485 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
489 if (connect(fd, (struct sockaddr *)sock, socklen) == -1) {
490 close(fd);
494 close(fd);
[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_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/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 TSRMLS_DC) { 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/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_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 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/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 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...]
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...]
/PHP_TRUNK/sapi/tux/
H A Dphp_tux.c34 void tux_closed_conn(int fd);
363 int fd;
366 fd = (int) bla;
369 send(fd, "test<br />\n", 9, 0);
373 tux(TUX_ACTION_CONTINUE_REQ, (user_req_t *) fd);
374 /* We HAVE to trigger some event on the fd. Otherwise
377 shutdown(fd, 2);
408 void tux_closed_conn(int fd) argument
412 if (TG(on_close)) TG(on_close)(fd);
/PHP_TRUNK/ext/fileinfo/libmagic/
H A Dreadcdf.c312 file_trycdf(struct magic_set *ms, int fd, const unsigned char *buf, argument
325 info.i_fd = fd;
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 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/Zend/
H A Dzend_stream.h70 int fd; member in union:_zend_file_handle::__anon13
/PHP_TRUNK/ext/zlib/
H A Dzlib_fopen_wrapper.c134 php_socket_t fd; local
136 if (SUCCESS == php_stream_cast(innerstream, PHP_STREAM_AS_FD, (void **) &fd, REPORT_ERRORS)) {
139 self->gz_file = gzdopen(dup(fd), mode);
/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/bz2/
H A Dbz2.c263 php_socket_t fd; local
264 if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD, (void **) &fd, REPORT_ERRORS)) {
265 bz_file = BZ2_bzdopen(fd, mode);
408 php_socket_t fd; local
444 if (FAILURE == php_stream_cast(stream, PHP_STREAM_AS_FD, (void *) &fd, REPORT_ERRORS)) {
448 bz = BZ2_bzdopen(fd, mode);

Completed in 43 milliseconds

123