ID: 37726 Updated by: [EMAIL PROTECTED] Reported By: n dot escuder at intra-links dot com -Status: Open +Status: Bogus Bug Type: Program Execution Operating System: Linux PHP Version: 5.1.4 New Comment:
Please read what [EMAIL PROTECTED] said. No bug here. Previous Comments: ------------------------------------------------------------------------ [2006-09-09 13:30:22] n dot escuder at intra-links dot com Hello, When we create a child process on unix with fork and execl as php does in proc_open we must cleanup all open fd execpt 0 1 2 before call execl to have a clean child. I think this is a bug because if in a script you open an sqlite query ex: update ... and you start a proc_open the proc_open will have the fd to the db dans the parent process will have a lock on the database. Any childs process must not herit the parent fd's ! I use php cli version and start a lot of process system from an php script parent and all child get all fd's from the parent ( connection to database, files opened ... ). This is not clean because all process are new process started by proc_open and not pcntl_fork. See You. Escuder Nicolas PS: I'm french so sorry for the traduction ;) ------------------------------------------------------------------------ [2006-09-08 20:57:50] [EMAIL PROTECTED] Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php ------------------------------------------------------------------------ [2006-06-26 07:55:39] n dot escuder at intra-links dot com This is not the same in the bug #34794 the patch i see is only for new opened descriptor and not all opened descriptor ( databases connections ... ). In proc_open you use fork for creating a new child and change de descriptor of STDIN STDOUT STDERR and after you do an exec. Just before doing the exec you must close all open descriptor greater than STDERR. ------------------------------------------------------------------------ [2006-06-25 17:51:36] jdolecek at NetBSD dot org This may be the same problem as Bug #34794, which includes the fix. ------------------------------------------------------------------------ [2006-06-07 17:08:45] n dot escuder at intra-links dot com Yes when we do a pcntl_fork or a fork in C the FD must stay open but here it's a complety new program that is started. Proc_open use fork for starting the new process but don't cleanup open descriptor after the fork. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/37726 -- Edit this bug report at http://bugs.php.net/?id=37726&edit=1