From:             peillert at xs4all dot nl
Operating system: all
PHP version:      Irrelevant
PHP Bug Type:     Documentation problem
Bug description:  resource type not mentioned in proc_open

Description:
------------
the resource type of the proc_* functions are not
documented in both 

the chapter 'CXXII. Program Execution Functions' as 
the 'Appendix L. List of Resource Types'.

the resource type returned by get_resource_type is 'process'. i included
some source-code to get that
result. 

currently in the documentation it says:
'This extension has no resource types defined.'.

also on the proc_open page there is not any mention of how
the resource is called.

this can be tricky if you want to check if you got
the right resource.

greets, Docey.


Reproduce code:
---------------
<?php
/*

*/

$cmd = "ipconfig /all";
$pipes = array();
$pipespec = array();
$pipespec[0][0] = "pipe";
$pipespec[0][1] = "r";
$pipespec[1][0] = "pipe";
$pipespec[1][1] = "w";
$pipespec[2][0] = "pipe";
$pipespec[2][1] = "w";


$rc = proc_open($cmd, $pipespec, $pipes);

        if(is_resource($rc)){
                $type = get_resource_type($rc);
                print("proc_open returns a resource of type '".$type."'.");
        }else{
         print("proc_open did not return a resource.");
        }

proc_close($rc);

?>

Expected result:
----------------
the resource type of proc_open wich is not documented.

Actual result:
--------------
well, so see this updated in both 
the chapter 'CXXII. Program Execution Functions' as 
the 'Appendix L. List of Resource Types'. 



-- 
Edit bug report at http://bugs.php.net/?id=38200&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=38200&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=38200&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=38200&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=38200&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=38200&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=38200&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=38200&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=38200&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=38200&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=38200&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=38200&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=38200&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=38200&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=38200&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=38200&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=38200&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=38200&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=38200&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=38200&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=38200&r=mysqlcfg

Reply via email to