mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Apparently our pipe detection code just above this isn't foolproof.
Catch it here.
This commit is contained in:
parent
f90bdf8933
commit
c4ba9edd57
1 changed files with 6 additions and 0 deletions
|
@ -208,6 +208,12 @@ PHPAPI php_stream *_php_stream_fopen_from_fd(int fd, const char *mode, const cha
|
|||
stream->flags |= PHP_STREAM_FLAG_NO_SEEK;
|
||||
} else {
|
||||
stream->position = lseek(self->fd, 0, SEEK_CUR);
|
||||
#ifdef ESPIPE
|
||||
if (stream->position == (off_t)-1 && errno == ESPIPE) {
|
||||
stream->position = 0;
|
||||
stream->is_pipe = 1;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue