Commit Graph

189 Commits

Author SHA1 Message Date
Xinchen Hui
4bebcb84ad Fixed condition check 2017-04-10 14:47:24 +08:00
Evgeniy Makhrov
d0279242ce add 'e' flag for fopen() to enable CLOEXEC 2017-01-07 12:10:51 +01:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Xinchen Hui
3956deb1b2 Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Fixed bug #72853 (stream_set_blocking doesn't work)

Conflicts:
	main/streams/plain_wrapper.c
2016-08-17 16:56:02 +08:00
Xinchen Hui
abe00908af Fixed bug #72853 (stream_set_blocking doesn't work)
Implemented  PHP_STREAM_OPTION_META_DATA_API for plain_wrappers
2016-08-17 16:54:21 +08:00
Joe Watkins
f580540c8d simplify expression 2016-04-28 15:50:27 +01:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Anatol Belski
9d82a7dc98 add overflow check 2015-09-02 17:05:45 +02:00
Anatol Belski
20e765b841 Fixed bug #69900 Too long timeout on pipes 2015-07-28 10:28:45 +02:00
Anatol Belski
6f3dd4d45b fix pipe peek timeout 2015-07-02 15:19:38 +02:00
Christoph M. Becker
58b982afed Fix alignment on 32-bit 2015-07-02 14:23:07 +02:00
Anatol Belski
4e5758f377 fix c/p issue 2015-07-02 14:22:58 +02:00
Anatol Belski
734d907aa4 initial stuff to make allow blocking pipes on windows 2015-07-02 14:22:55 +02:00
Dmitry Stogov
7aa7627172 Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes). 2015-06-30 13:59:27 +03:00
Anatol Belski
69c2e53419 no more winxp, but really 2015-04-04 20:39:04 +02:00
Anatol Belski
184793b5c1 fix condition 2015-03-19 22:33:16 +01:00
Anatol Belski
f43cc2a19a use portable fseek 2015-03-11 21:46:37 +01:00
Dmitry Stogov
6d065a8545 Avoid repeatable strlen() calls 2015-03-05 18:18:39 +03:00
Dmitry Stogov
2fa8d67a5c Use zend_string* instead of char* for opened_patch handling. Avoid reallocations and improve string reuse. 2015-03-04 02:05:28 +03:00
Stanislav Malyshev
c752e1b786 Merge branch 'pull-request/1032'
* pull-request/1032:
  do_fstat changes
2015-02-01 00:56:27 -08:00
Stanislav Malyshev
50703c900f Merge branch 'PHP-5.6'
* PHP-5.6:
  fix group name handling

Conflicts:
	main/streams/plain_wrapper.c
2015-01-31 23:48:08 -08:00
Stanislav Malyshev
c5526291ce Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  fix group name handling
2015-01-31 23:47:25 -08:00
Joshua Rogers
f8bf646fc4 do_fstat changes
Check return values of 'do_fstat' function in all places.
2015-02-01 18:47:09 +11:00
Stanislav Malyshev
e5e251b023 fix group name handling 2015-01-31 23:47:03 -08:00
Michael Wallner
570ed1a1a4 fix warnings 2015-01-30 22:32:00 +01:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Xinchen Hui
73c1be2653 Bump year 2015-01-15 23:26:03 +08:00
Stanislav Malyshev
b7a7b1a624 trailing whitespace removal 2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Anatol Belski
49de5b7aed Merge branch 'PHP-5.6'
* PHP-5.6:
  add include for missing usleep proto
  C89 compat
  Added more useful warning messages
  Changed based on comments and make its behaviour equal to the Windows version
  Fix #53092 - dns_get_record does not return false on dns server failure
  Fix php cli (-S option) inconsistent port parsing

Conflicts:
	main/streams/plain_wrapper.c
2014-12-01 08:32:12 +01:00
Anatol Belski
c370683903 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  add include for missing usleep proto
  C89 compat
  Added more useful warning messages
  Changed based on comments and make its behaviour equal to the Windows version
  Fix #53092 - dns_get_record does not return false on dns server failure
  Fix php cli (-S option) inconsistent port parsing
2014-12-01 08:30:59 +01:00
Anatol Belski
c1ec815fae add include for missing usleep proto 2014-12-01 08:27:46 +01:00
Anatol Belski
f4a0e601ee C89 compat 2014-12-01 08:24:44 +01:00
Stanislav Malyshev
b564e7b0de Merge branch 'PHP-5.6'
* PHP-5.6:
  Update NEWS
  fix typo
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:35:11 -08:00
Stanislav Malyshev
60d5b2ec24 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Added test and review suggestion
  Fix bug #68335: rmdir doesnt work with file:// stream wrapper
2014-11-30 17:07:02 -08:00
mcq8
04808aa7e1 Added test and review suggestion 2014-11-30 16:38:20 -08:00
mcq8
6eaa4d01d3 Fix bug #68335: rmdir doesnt work with file:// stream wrapper 2014-11-30 16:38:13 -08:00
Anatol Belski
5400f92c75 proper dllexport 2014-11-18 15:38:35 +01:00
Anatol Belski
deaeca4000 fix datatype mismatches 2014-10-27 17:15:26 +01:00
Anatol Belski
74997dcf7e add include for usleep() proto 2014-10-23 16:49:47 +02:00
Anatol Belski
b428dc761d Merge branch 'PHP-5.6'
* PHP-5.6:
  increase the polling period to not to break existing behaviours
2014-09-29 17:29:00 +02:00
Anatol Belski
231a311ecb Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  increase the polling period to not to break existing behaviours
2014-09-29 17:28:27 +02:00
Anatol Belski
46aa2c396b increase the polling period to not to break existing behaviours 2014-09-29 17:27:24 +02:00
Anatol Belski
78e23758b7 Merge branch 'PHP-5.6'
* PHP-5.6:
  updated NEWS
  Fixed bug #51800 proc_open on Windows hangs forever

Conflicts:
	main/streams/plain_wrapper.c
2014-09-29 16:30:40 +02:00
Anatol Belski
87a37f4090 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Fixed bug #51800 proc_open on Windows hangs forever
2014-09-29 16:27:33 +02:00
Anatol Belski
0c982798e0 Fixed bug #51800 proc_open on Windows hangs forever
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.
2014-09-29 16:24:34 +02:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
6a92d32105 fix type 2014-09-14 14:43:39 +02:00