ID: 33828 Updated by: [EMAIL PROTECTED] Reported By: vesely at tana dot it -Status: Open +Status: Wont fix -Bug Type: Reproducible crash +Bug Type: Unknown/Other Function Operating System: Unix PHP Version: 4.4.0 New Comment:
It's fixed in 5.x, but I don't think that the fix will get into 4.4.0 ever, as it was just a small part of exec()/proc_open() overall rewrite. So I'd say you have to live with that (or use 5.x instead, this is a perfect reason to start using it). Previous Comments: ------------------------------------------------------------------------ [2005-07-22 20:33:13] vesely at tana dot it Description: ------------ If the proc_open was inside a class object, then on a fatal error the child process is not killed. (Both CLI and Apache.) That behaviour makes it difficult to develop scripts based on classes using proc_open. If the $proc is not inside a class object, I obtained a similar freezing doing $proc = 0 before the fatal error. Reproduce code: --------------- <?php class my_class { var $proc, $pipes; function my_class() { $this->proc = proc_open("cat -", array( 0 => array("pipe", "r"), 1 => array("file", "/dev/null", "w"), 2 => array("file", "/dev/null", "w")), $this->pipes); } } $p = new my_class(); printf("%s proc hangs on fatal PHP error?\n", is_resource($p->proc) ? "Open" : "Not open"); non_existing_function("hangs if open"); // not reached... ?> ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=33828&edit=1