#38796 [Opn->Bgs]: Self-call __destructor from child process

From: Date: Tue, 12 Sep 2006 20:01:42 +0000
Subject: #38796 [Opn->Bgs]: Self-call __destructor from child process
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-102073@lists.php.net to get a copy of this message
ID: 38796 Updated by: tony2001@php.net Reported By: fiw at mail dot ru -Status: Open +Status: Bogus Bug Type: PCNTL related Operating System: FreeBSD 6.1 PHP Version: 5.1.6 New Comment: Child process is just a copy of parent process. That's how fork() call works. Constructors are not called, because they were called in the child process, _before_ the fork() call. Previous Comments: ------------------------------------------------------------------------ [2006-09-12 19:55:24] fiw at mail dot ru But why child process calls only every destructors and not calls they constructors (from any objects)? ------------------------------------------------------------------------ [2006-09-12 19:38:33] tony2001@php.net fork() duplicates the parent environment, including all the variables and objects. Apparently child processes call destructors, as usual PHP processes. No bug here. ------------------------------------------------------------------------ [2006-09-12 19:31:33] fiw at mail dot ru Ok, thanks. You can check your mailbox. ------------------------------------------------------------------------ [2006-09-12 19:18:29] tony2001@php.net Feel free to use private mail and Russian. ------------------------------------------------------------------------ [2006-09-12 19:16:18] fiw at mail dot ru Sorry, I don't know english much well. But you can see this bug in expected result - child process call not own destructors. ------------------------------------------------------------------------ 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/38796 -- Edit this bug report at http://bugs.php.net/?id=38796&edit=1

« previous php.bugs (#102073) next »