/php-src/main/streams/ |
H A D | plain_wrapper.c | 165 int fd; in do_fstat() local 189 self->fd = fd; in _php_stream_fopen_from_fd_int() 220 int fd; in _php_stream_fopen_temporary_file() local 223 if (fd != -1) { in _php_stream_fopen_temporary_file() 241 close(fd); in _php_stream_fopen_temporary_file() 523 data->fd = -1; in php_stdiop_close() 553 int fd; in php_stdiop_sync() local 674 int fd; in php_stdiop_set_option() local 685 if (fd == -1) in php_stdiop_set_option() 1106 int fd; in _php_stream_fopen() local [all …]
|
/php-src/ext/fileinfo/libmagic/ |
H A D | buffer.c | 42 buffer_init(struct buffer *b, int fd, const zend_stat_t *st, const void *data, in buffer_init() argument 45 b->fd = fd; in buffer_init() 48 else if (b->fd == -1 || zend_fstat(b->fd, &b->st) == -1) in buffer_init() 87 if (FINFO_LSEEK_FUNC(b->fd, b->eoff, SEEK_SET) == (zend_off_t)-1 || in buffer_fill() 88 FINFO_READ_FUNC(b->fd, b->ebuf, b->elen) != (ssize_t)b->elen) in buffer_fill()
|
H A D | compress.c | 280 int fd = b->fd; in file_zmagic() local 547 if ((fd = dup2(tfd, fd)) == -1) { in file_pipe2file() 556 return fd; in file_pipe2file() 863 if (fd[i] == -1) in closefd() 866 fd[i] = -1; in closefd() 870 closep(int *fd) in closep() argument 880 if (fd == i) in movedesc() 891 close(v ? fd : fd); in movedesc() 902 close(v ? fd : fd); in closedesc() 909 if (fd != -1) { in handledesc() [all …]
|
/php-src/tests/output/ |
H A D | stream_isatty.inc | 8 'STDIN (php://fd/0)' => fopen('php://fd/0', 'rb'), 11 'STDOUT (php://fd/1)' => fopen('php://fd/1', 'wb'), 14 'STDERR (php://fd/2)' => fopen('php://fd/2', 'wb'),
|
H A D | sapi_windows_vt100_support.inc | 31 'STDIN (php://fd/0)' => fopen('php://fd/0', 'rb'), 34 'STDOUT (php://fd/1)' => fopen('php://fd/1', 'wb'), 37 'STDERR (php://fd/2)' => fopen('php://fd/2', 'wb'),
|
/php-src/ext/fileinfo/tests/ |
H A D | cve-2014-1943-mb.phpt | 7 $fd = __DIR__.'/cve-2014-1943私はガラスを食べられます.data'; 15 file_put_contents($fd, $a); 17 var_dump(finfo_file($fi, $fd)); 20 file_put_contents($fd, $b); 23 var_dump(finfo_file($fi, $fd));
|
H A D | cve-2014-1943.phpt | 7 $fd = __DIR__.'/cve-2014-1943.data'; 15 file_put_contents($fd, $a); 17 var_dump(finfo_file($fi, $fd)); 20 file_put_contents($fd, $b); 23 var_dump(finfo_file($fi, $fd));
|
/php-src/ext/standard/ |
H A D | php_fopen_wrapper.c | 179 int fd = -1; in php_stream_url_wrap_php() local 247 fd = STDIN_FILENO; in php_stream_url_wrap_php() 249 fd = dup(fd); in php_stream_url_wrap_php() 255 fd = dup(STDIN_FILENO); in php_stream_url_wrap_php() 263 fd = STDOUT_FILENO; in php_stream_url_wrap_php() 265 fd = dup(fd); in php_stream_url_wrap_php() 279 fd = STDERR_FILENO; in php_stream_url_wrap_php() 281 fd = dup(fd); in php_stream_url_wrap_php() 333 if (fd == -1) { in php_stream_url_wrap_php() 388 if (fd == -1) { in php_stream_url_wrap_php() [all …]
|
H A D | flock_compat.c | 22 PHPAPI int flock(int fd, int operation) in flock() argument 24 return php_flock(fd, operation); in flock() 28 PHPAPI int php_flock(int fd, int operation) in php_flock() argument 48 ret = fcntl(fd, operation & LOCK_NB ? F_SETLK : F_SETLKW, &flck); in php_flock() 105 HANDLE hdl = (HANDLE) _get_osfhandle(fd);
|
/php-src/ext/standard/tests/streams/ |
H A D | bug74090.phpt | 21 $fd = stream_socket_client("udp://localhost:$port", $errno, $errstr, 0, STREAM_CLIENT_CONNECT | STR… 22 stream_set_blocking($fd, 0); 23 stream_socket_sendto($fd, $data); 26 $ret = stream_get_contents($fd, 65565); 28 stream_socket_shutdown($fd, STREAM_SHUT_RDWR);
|
H A D | set_file_buffer.phpt | 31 $fd = fopen("test://foo","r"); 32 var_dump(set_file_buffer($fd, 50)); 33 var_dump(stream_set_chunk_size($fd, 42)); 34 var_dump(fwrite($fd, str_repeat('0', 70)));
|
/php-src/sapi/fpm/fpm/events/ |
H A D | devpoll.c | 93 pollfds[i].fd = -1; in fpm_event_devpoll_init() 173 if (q->ev && q->ev->fd == active_pollfds[i].fd) { in fpm_event_devpoll_wait() 200 pollfd.fd = ev->fd; in fpm_event_devpoll_add() 211 ev->index = ev->fd; in fpm_event_devpoll_add() 225 pollfd.fd = ev->fd; in fpm_event_devpoll_remove()
|
/php-src/sapi/cli/tests/ |
H A D | 022.inc | 6 $fd = fopen("php://stdin","r"); 7 var_dump($fd); 9 $client_socket = stream_socket_accept($fd);
|
H A D | cli_server_persistent_string001.phpt | 12 $fd = stream_socket_client("tcp://" . PHP_CLI_SERVER_ADDRESS); 13 fwrite($fd, "GET /index.php HTTP/1.0\r\nHost: hello"); 14 fclose($fd);
|
/php-src/ext/standard/tests/file/ |
H A D | userstreams_004.phpt | 20 function test($name, $fd, $mode) { 22 flock($fd, $mode); 23 $data = stream_get_meta_data($fd); 30 $fd = fopen("test://foo","r"); 36 test("fclock($mode)", $fd, constant($mode)); 37 test("fclock($mode|LOCK_NB)", $fd, constant($mode)|LOCK_NB);
|
H A D | userstreams_002.phpt | 20 function test($name, $fd, $return_value) { 22 $data = stream_get_meta_data($fd); 24 $r = array($fd); 36 $fd = fopen("test://foo","r"); 39 test("valid stream", $fd, STDIN); 41 test("return value is false", $fd, false); 42 test("return value not a stream resource", $fd, "foo"); 43 test("return value is stream itself", $fd, $fd); 44 test("return value cannot be casted", $fd, $fd2);
|
H A D | fopen_variation1.phpt | 8 $fd = fopen($file, "r", true); 9 var_dump($fd); 10 fclose($fd);
|
H A D | userstreams_006.phpt | 25 $fd = fopen("test://foo","r"); 27 var_dump(stream_set_write_buffer($fd, 50)); 28 var_dump(stream_set_chunk_size($fd, 42)); 30 var_dump(fwrite($fd, str_repeat('0', 70)));
|
H A D | bug45303.phpt | 5 $fd = fopen("php://stdout","a"); 6 var_dump($fd); 7 var_dump(fseek($fd, 1024*1024, SEEK_SET));
|
H A D | userstreams_005.phpt | 27 function test($name, $fd, $dest_size) { 29 var_dump(ftruncate($fd, $dest_size)); 35 $fd = fopen("test://foo","r"); 40 test("stream_truncate size 0", $fd, 0); 41 test("stream_truncate size 10", $fd, 10); 43 test("stream_truncate negative size", $fd, -1);
|
/php-src/ext/random/ |
H A D | csprng.c | 150 int fd = RANDOM_G(random_fd); in php_random_bytes() 153 if (fd < 0) { in php_random_bytes() 155 fd = open("/dev/urandom", O_RDONLY); in php_random_bytes() 156 if (fd < 0) { in php_random_bytes() 169 if (fstat(fd, &st) != 0 || in php_random_bytes() 176 close(fd); in php_random_bytes() 186 RANDOM_G(random_fd) = fd; in php_random_bytes() 192 ssize_t n = read(fd, bytes + read_bytes, size - read_bytes); in php_random_bytes()
|
/php-src/sapi/fpm/fpm/ |
H A D | fpm_sockets.h | 36 static inline int fd_set_blocked(int fd, int blocked) /* {{{ */ in fd_set_blocked() argument 38 int flags = fcntl(fd, F_GETFL); in fd_set_blocked() 49 return fcntl(fd, F_SETFL, flags); in fd_set_blocked()
|
/php-src/ext/pcre/pcre2lib/sljit/allocator_src/ |
H A D | sljitExecAllocatorPosix.c | 35 int fd = -1; in alloc_chunk() local 47 fd = dev_zero; in alloc_chunk() 50 retval = mmap(NULL, size, prot, flags, fd, 0); in alloc_chunk()
|
/php-src/ext/gd/libgd/ |
H A D | gd_xbm.c | 32 gdImagePtr gdImageCreateFromXbm(FILE * fd) in gdImageCreateFromXbm() argument 49 rewind(fd); in gdImageCreateFromXbm() 50 while (fgets(fline, MAX_XBM_LINE_SIZE, fd)) { in gdImageCreateFromXbm() 107 if ((ch=getc(fd)) == EOF) { in gdImageCreateFromXbm() 119 if ((ch=getc(fd)) == EOF) { in gdImageCreateFromXbm() 123 if ((ch=getc(fd)) == EOF) { in gdImageCreateFromXbm() 128 if ((ch=getc(fd)) == EOF) { in gdImageCreateFromXbm() 132 if ((ch=getc(fd)) == EOF) { in gdImageCreateFromXbm()
|
/php-src/ext/opcache/jit/ir/ |
H A D | ir_perf.c | 104 int fd, ret; in ir_perf_jitdump_open() local 114 fd = open("/proc/self/exe", O_RDONLY); in ir_perf_jitdump_open() 116 fd = open("/proc/curproc/exe", O_RDONLY); in ir_perf_jitdump_open() 124 fd = open(path, O_RDONLY); in ir_perf_jitdump_open() 126 fd = open("/proc/self/path/a.out", O_RDONLY); in ir_perf_jitdump_open() 134 fd = open(path, O_RDONLY); in ir_perf_jitdump_open() 136 fd = -1; in ir_perf_jitdump_open() 138 if (fd < 0) { in ir_perf_jitdump_open() 142 ret = read(fd, &elf_hdr, sizeof(elf_hdr)); in ir_perf_jitdump_open() 143 close(fd); in ir_perf_jitdump_open()
|