1
0
mirror of https://github.com/php/php-src.git synced 2026-04-22 23:48:14 +02:00
Commit Graph

98 Commits

Author SHA1 Message Date
Ilia Alshanetsky 695ae92c97 1) Make the output of system() binary safe
2) Solved a memory leak when the return_value variable passed by reference is
   not an integer in system()/exec()/passthru().
3) Solved a bug in exec(), which would make it append to the 2nd parameter
   (passed by reference) if the parameter is an array instead of overwriting it.
4) Changed the code to use the streams code, resulting in a smaller code base.
5) Various cleanups resulting in reduction of overall code base inside the file
   by ~ 1/3.
6) Speed improvements of ~2.5 times compared to previous performance (based on
   attached PHP script).
2003-02-26 22:11:12 +00:00
Ilia Alshanetsky aee0c18bde Made shell_exec() use streams, this simplifies the code and in some cases
makes it a little faster too.
2003-02-25 23:52:34 +00:00
Ilia Alshanetsky f29964e2ba Fixed bug #22414 and added a test case for it. 2003-02-25 16:21:00 +00:00
Ilia Alshanetsky 3bff5c0419 Fixed bug #22308 (optimized passthru, code is now ~40 times faster). 2003-02-20 00:32:51 +00:00
Ilia Alshanetsky 0ad5cac954 By popular demand nice() is renamed to proc_nice().
A better error message for proc_nice() failure.
2003-02-18 01:23:51 +00:00
Ilia Alshanetsky 0fd1009fcc Added nice() function, which allows changing of priority for the current
process.
2003-02-18 01:07:57 +00:00
Ilia Alshanetsky 71e9f8cdd5 Removed pointless memory allocation checks. 2003-01-18 20:01:46 +00:00
Wez Furlong 1a314027d3 - Move proc_open code to a source file of it's own.
- Tidy up that netware mess by performing a configure check which will
  define the symbol PHP_CAN_SUPPORT_PROC_OPEN if PHP can support proc_open.
- Protected the proc_open specific code with #ifdef PHP_CAN_SUPPORT_PROC_OPEN
  so that user-space scripts can use function_exists and react accordingly.

** Heads Up Win32: You need to add ext/standard/proc_open.c to the DSP and
** #define PHP_CAN_SUPPORT_PROC_OPEN in the w32 config header.
2003-01-15 16:29:00 +00:00
Anantha Kesari H Y 2e52c112df Modified for NetWare. 2003-01-03 16:06:02 +00:00
Anantha Kesari H Y 830298beb8 Modified for NetWare. 2003-01-03 14:37:42 +00:00
Sebastian Bergmann b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Wez Furlong 602734c7d9 Correct mistake introduced by my last commit on these files;
*_from_pipe() is for process-pipes created by fopen, not generic pipes
created from proc_open().
Correctly implemented the fifo/pipe check for *_from_file() and it seems
to be working correctly now.
2002-12-19 20:23:50 +00:00
Wez Furlong c5d4e4b321 MFB: popen/pclose and proc_open/proc_close fixes. 2002-12-12 17:51:25 +00:00
Marcus Boerger 49a99a98f4 -php_error -> php_error_docref
-removed some cases where emalloc result was tested
2002-12-05 20:59:49 +00:00
Ilia Alshanetsky a8d4bb9d28 Silence compiler warning. 2002-11-04 17:38:30 +00:00
Jan Lehnardt cf4d435a12 - fix segfault in proc_open
#no bugreports found
2002-10-24 08:46:21 +00:00
Wez Furlong 0141e97052 Make these all work with persistent streams too. 2002-09-25 15:46:47 +00:00
Ilia Alshanetsky a694fa9ca7 Fixed bug #19313
Fixed argument count check for system/exec/passthru functions
Added a check to system/exec/passthru functions to make sure execution
parameter is not blank before attempting to execute it.
2002-09-19 18:59:32 +00:00
Marcus Boerger 149ad05b4f php_error_docref
#New conversion available at: http://docref.txt.marcus-boerger.de
2002-08-24 01:19:28 +00:00
James E. Flemer 3a8d66a021 Fix typo in #if. Bug #17538. 2002-08-02 14:35:24 +00:00
Rasmus Lerdorf b15651c95f Ugh 2002-08-01 15:51:56 +00:00
Derick Rethans 728f2de442 Unify error messages 2002-07-08 12:52:22 +00:00
Wez Furlong 4fd00c9502 Fix (stupid) segfault. #17379 2002-05-23 10:17:07 +00:00
Derick Rethans 708f980389 - Fix unchecked return values with parameters to proc_open. (Fixes
bug #17375)
2002-05-23 07:52:03 +00:00
Stanislav Malyshev b67bafefa5 Return right exit status 2002-05-05 17:14:12 +00:00
Derick Rethans 8ffd089e02 - Fix for bug #16811 2002-04-25 06:43:11 +00:00
Wez Furlong fea3b0a7f8 fix TS build 2002-04-03 13:47:21 +00:00
Wez Furlong 27d1f7db16 Tidy up win32 implementation of proc_open.
Respect safe_mode_exec_dir.
Implement proc_close and return process return code under win32.
2002-04-03 13:39:35 +00:00
Wez Furlong a0f165a5cb main/streams.c 2002-04-02 16:46:33 +00:00
Wez Furlong 659a071e3d Streams are all tracked as resources now.
Add some logic that will help track down leaks
when debug is enabled.
2002-03-20 14:21:30 +00:00
Wez Furlong 09213d7bf8 change * formatting 2002-03-16 01:28:57 +00:00
Wez Furlong 0f65280cb5 New PHP streams... 2002-03-15 21:03:08 +00:00
Sebastian Bergmann 38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
foobar 488b76b95d ws fix 2001-11-04 02:09:55 +00:00
Derick Rethans 78747bd2df - Don't wrap lines... this is annoying while coding. 2001-09-09 13:29:31 +00:00
Zeev Suraski c0404f4631 Whitespace 2001-08-11 17:03:37 +00:00
Sascha Schumann 23b9300fd1 more tsrm cleanup 2001-08-06 03:50:52 +00:00
Zeev Suraski bc42c37513 More TSRMLS_FETCH work. Got it under 400 now. 2001-07-31 06:28:05 +00:00
Zeev Suraski 9f4c0ae6c0 More TSRMLS_FETCH work 2001-07-30 09:16:46 +00:00
Zeev Suraski b0224d51da Zend compatibility patch 2001-07-30 05:36:18 +00:00
Zeev Suraski d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Sascha Schumann 8492ece5f6 While researching a crash-bug in mail(), I found these two goldies.
Replace php_escape_shell_(arg|cmd) with straight-forward implementations.
2001-07-22 21:32:55 +00:00
Rasmus Lerdorf 81e2cf03ac Fix folding and clean up some extensions 2001-06-06 13:06:12 +00:00
Rasmus Lerdorf 25c3a3a39d vim-6 does folding - clean up a bunch of missing folding tags plus
some misguided RINIT and RSHUTDOWN calls in a few fringe extensions
2001-06-05 13:12:10 +00:00
Andi Gutmans 4c823e8a89 - Change macros from V_ to VCWD_ because of AIX name clash 2001-04-30 12:45:02 +00:00
Sean Bright 4175151567 - Fix for bugs #9042, #8212, and #8962. Patch from <tunacat@yahoo.com>
- Fixed proto for exec()
2001-04-28 13:16:18 +00:00
Andi Gutmans eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
André Langhorst 9fa484104e fix stas' last commit, added additional ifdefs PHP_SIGCHILD to fix win32 build 2001-02-23 05:08:15 +00:00
Stanislav Malyshev 4cda96691c Fix #8992, patch by yasushi_takahashi@tsuken.co.jp 2001-02-22 10:15:52 +00:00
Rasmus Lerdorf e37d304d35 Name this php_Exec instead 2001-01-14 16:41:06 +00:00