FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=17593&edit=1

ID: 17593
Updated by: kvz@php.net
Reported By: ruj dot sabya@gmail.com
Summary: If I put the daemon call inside a class, its
destructor gets called
Status: Bogus
Type: Bug
Package: System_Daemon
Operating System: Red Hat Enterprise Linux Server
Package Version: 0.10.3
PHP Version: 5.2.9
-Assigned To:
+Assigned To: kvz
Roadmap Versions:
New Comment:

-Assigned To:
+Assigned To: kvz



Previous Comments:
------------------------------------------------------------------------

[2010-07-16 10:31:32] kvz

-Status: Open
+Status: Bogus
Sorry, but your problem does not imply a bug in PEAR itself. For a
list of more appropriate places to ask for help using PEAR, please
visit http://pear.php.net/support/ as this bug system is not the
appropriate forum for asking support questions.

Thank you for your interest in PEAR.

Indeed it's expected behavior. Daemonize your process first, then do
important things
(connecting to your db & such)

------------------------------------------------------------------------

[2010-07-15 05:54:15] sabya

I did some more analysis on this. Actually the destructor is getting
called by the parent process that is getting killed when the daemon
starts.

I think that would be expected. But not too sure.

------------------------------------------------------------------------

[2010-07-14 15:30:14] sabya

Okay. I have uploaded the files here:
http://webyog.com/downloads/sabya/reproducingCode.tgz

------------------------------------------------------------------------

[2010-07-14 15:23:11] sabya

I want to attach the script files where can I attach them? Not able to
find any interface to do that. I had clicked the check-box "I have files
to attach..." while reporting this issue. But it did nothing.

------------------------------------------------------------------------

[2010-07-14 15:15:07] sabya

Description:
------------
I have kept the System_Daemon::start() call inside a PHP class.
Now I am creating an object of
that class and calling a method of it.

When the System_Daemon::start() function gets called, the
destructor also gets executed! Why?

Expected result:
----------------
The execution of the destructor is unexpected.

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJul 17, '12 at 10:07a
activeJul 17, '12 at 10:07a
posts1
users1
websitepear.php.net

1 user in discussion

Kvz: 1 post

People

Translate

site design / logo © 2022 Grokbase