summaryrefslogtreecommitdiff
path: root/main/streams/plain_wrapper.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-5.5' into PHP-5.6Anatol Belski2014-09-291-1/+1
|\ | | | | | | | | * PHP-5.5: increase the polling period to not to break existing behaviours
| * increase the polling period to not to break existing behavioursAnatol Belski2014-09-291-1/+1
| |
* | Merge branch 'PHP-5.5' into PHP-5.6Anatol Belski2014-09-291-0/+28
|\ \ | |/ | | | | | | * PHP-5.5: Fixed bug #51800 proc_open on Windows hangs forever
| * Fixed bug #51800 proc_open on Windows hangs foreverAnatol Belski2014-09-291-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This loop can block for some minutes, theoretically. Practially however, this is a 99% non issue for a normal use case. This is required because read() is synchronous. The PHP streams API wants to fill its internal buffers, therefore it might try to read some more data than user has demanded. Also, for a case where we want to read X bytes, but neither enough data nor EOF arrives, read() will block until it could fill the buffer. If a counterpart station runs slowly or delivers not all the data at once, read() would still be waiting. If we quit too early, we possibly could loose some data from the pipe. Thus it has to emulate the read() behaviour, but obviously not completely, just to some grade. Reading big data amount is for sure an issue on any platforms, it depends on the pipe buffer size, which is controlled by the system. On Windows, the buffer size seems to be way too small, which causes buffer congestion and a dead lock. It is essential to read the pipe descriptors simultaneously and possibly in the same order as the opposite writes them. Thus, this will work with smaller buffer data sizes passed through pipes. As MSDN states, anonymous pipes don't support asynchronous operations. Neither anonymous pipes do support select() as they are not SOCKETs but file descriptors. Consequently - bigger data sizes will need a better solution based on threads. However it is much more expencive. Maybe a better solution could be exporting a part of the internal doing as a userspace function which could perform some kind of lookahead operation on the pipe descriptor. This is just the first stone, depending on the user feedback we might go for further improvements in this area.
| * Bump yearXinchen Hui2014-01-031-1/+1
| |
* | restore API compatibilityMichael Wallner2014-07-031-0/+5
| |
* | finishMichael Wallner2014-07-031-6/+1
| |
* | refactor _php_stream_fopen_{temporary_,tmp}file()Michael Wallner2014-07-031-20/+14
| |
* | Fixes to various stream cast on win64Anatol Belski2014-03-191-6/+6
| | | | | | | | | | | | This fixes further issues on win64 with casts from the streams. Sockets/descriptors handling was unitized. This has an impact only on win64, php_socket_t otherwise can be feed back to int datatype.
* | Bump yearXinchen Hui2014-01-031-1/+1
| |
* | Merge branch 'PHP-5.5' into PHP-5.6Michael Wallner2013-12-061-5/+7
|\ \ | |/ | | | | | | | | * PHP-5.5: Fixed bug #61645 (fopen and O_NONBLOCK) fix possibly uninitialized value
| * Merge branch 'PHP-5.4' into PHP-5.5Michael Wallner2013-12-061-5/+7
| |\ | | | | | | | | | | | | | | | * PHP-5.4: Fixed bug #61645 (fopen and O_NONBLOCK) fix possibly uninitialized value
| | * Fixed bug #61645 (fopen and O_NONBLOCK)Michael Wallner2013-12-061-5/+7
| | | | | | | | | | | | | | | | | | if a mode like "rn" was passed to fopen(), then php_stream_parse_fopen_modes() would assign O_WRONLY to flags, because O_NONBLOCK tainted flags for the r/w/+ check
| | * Happy New YearXinchen Hui2013-01-011-1/+1
| | |
| | * - Year++Felipe Pena2012-01-011-1/+1
| | |
| | * Fixed ZE specific compile warnings (Bug #55629)Dmitry Stogov2011-09-131-1/+1
| | |
| | * retore open_basedir check for unlinkStanislav Malyshev2011-07-311-35/+39
| | |
| | * - Fixed bug 55124, recursive mkdir fails with current (dot) directory in pathPierre Joye2011-07-261-14/+7
| | |
| | * implement streams metadata API per RFCStanislav Malyshev2011-05-251-1/+93
| | |
* | | applied and fixed the original patchAnatol Belski2013-10-171-1/+1
| | | | | | | | | | | | initial work on the patch import done
* | | Constify streams API and a few other calls down the rabbit hole.Andrey Hristov2013-07-301-10/+11
|/ / | | | | | | | | (`char *` to `const char *` for parameters and few return values) In a few places int len moved to size_t len.
* | Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | * fixed bug #60704 unlink() bug with some files pathMateusz Kocielski2012-02-141-7/+20
| | | | | | | | | | Reviewed by: rasmus@
* | - Year++Felipe Pena2012-01-011-1/+1
| |
* | Fixed ZE specific compile warnings (Bug #55629)Dmitry Stogov2011-09-131-1/+1
| |
* | retore open_basedir check for unlinkStanislav Malyshev2011-07-311-0/+4
| |
* | - Fixed bug 55124, recursive mkdir fails with current (dot) directory in pathPierre Joye2011-07-261-14/+7
| |
* | implement streams metadata API per RFCStanislav Malyshev2011-05-251-1/+93
|/
* - PHP_STREAM_OPTION_WRITE_BUFFER no longer disables the read buffer of a plainGustavo André dos Santos Lopes2011-02-191-3/+0
| | | | | | | | | | stream when 0 is given as the value. - PHP_STREAM_OPTION_WRITE_BUFFER no longer changes the chunk size in socket streams. - Added stream_set_chunk_size() function. - Some signedness fixes. - Test for commit r308474, now that it's possible to actually test it.
* Fix bug #53913 (Streams functions assume HAVE_GLOB is defined). Patch by ChrisAdam Harvey2011-02-041-0/+2
| | | | | Jones.
* - don't continue if no valid option valuePierre Joye2011-01-201-0/+2
|
* - Year++Felipe Pena2011-01-011-1/+1
|
* - Renamed php_stream_rep_nonstand_mode to Gustavo André dos Santos Lopes2010-11-051-1/+1
| | | | | | php_stream_mode_sanitize_fdopen_fopencookie, made it not exported and movied it from php_streams.h to php_streams_int.h.
* - Fixed bug #53241 (stream casting that relies on fdopen/fopencookie failsGustavo André dos Santos Lopes2010-11-051-1/+3
| | | | with streams opened with, inter alia, the 'xb' mode).
* - WSPierre Joye2010-09-011-2/+2
|
* - add lstat support for WindowsPierre Joye2010-09-011-1/+9
|
* Removed safe_modeKalle Sommer Nielsen2010-04-261-72/+0
| | | | | | | * Removed ini options, safe_mode* * Removed --enable-safe-mode --with-exec-dir configure options on Unix * Updated extensions, SAPI's and core * php_get_current_user() is now declared in main.c, thrus no need to include safe_mode.h anymore
* - get the right error on windowsPierre Joye2010-02-211-0/+4
|
* - prevent unexpectable behaviors (for the user) with invalid pathPierre Joye2010-02-071-21/+19
|
* - removed debug breakpoint and improve inline commentPierre Joye2010-01-271-2/+2
|
* - prevent bad things to happen when invalid path are passed to MoveFileExPierre Joye2010-01-271-1/+27
|
* - [DOC] #45986, bad file descriptor warning when rename is used with invalid ↵Pierre Joye2010-01-261-3/+10
| | | | path, add php_win32_docref2_from_error to display system error for non posix api
* sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-031-1/+1
|
* remove automatic file unlocking on shutdown and/or stream closeAntony Dovgal2009-12-251-3/+0
| | | | | | (make it win32-specific for 5_2, as discussed with Ilia)
* Fix #50063 (safe_mode_include_dir fails)Johannes Schlüter2009-11-121-0/+4
|
* MFH: Added support for passing O_NONBLOCK to the underlying open() system callMikko Koppanen2009-04-111-1/+5
|
* Adjust conditionIlia Alshanetsky2009-02-101-2/+2
|
* MFB: typo fixIlia Alshanetsky2009-02-101-1/+1
|
* MFB: Added path truncation E_NOTICE to let people now when path resolvingIlia Alshanetsky2009-02-101-2/+6
| | | | | caused the file path to be truncated.
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|