~l3on/ubuntu/precise/rkward/rebuild1

« back to all changes in this revision

Viewing changes to rkward/scriptbackends/phpbackend.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2009-10-26 14:30:00 UTC
  • mfrom: (1.1.13 upstream) (6.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20091026143000-wzwt6cryjnwce23k
Tags: 0.5.2-1
* new upstream release
  closes: #551306 (added support for the new dynamic help system)
* Add "DM-Upload-Allowed: yes" in control
* bump standards version to 3.8.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
                          phpbackend  -  description
3
3
                             -------------------
4
4
    begin                : Mon Jul 26 2004
5
 
    copyright            : (C) 2004, 2007 by Thomas Friedrichsmeier
 
5
    copyright            : (C) 2004, 2007, 2009 by Thomas Friedrichsmeier
6
6
    email                : tfry@users.sourceforge.net
7
7
 ***************************************************************************/
8
8
 
90
90
        RK_TRACE (PHP);
91
91
        if (!dead) {
92
92
                dead = true;
93
 
                php_process->kill ();
 
93
                if (php_process) php_process->kill ();
94
94
                QTimer::singleShot (10000, this, SLOT (deleteLater())); // don't wait for ever for the process to die, even if it's somewhat dangerous
 
95
                code_property = 0;
95
96
        }
96
97
 
97
98
        busy = false;
98
 
        
99
 
        while (command_stack.count ()) {
100
 
                delete command_stack.takeFirst ();
101
 
        }
102
99
}
103
100
 
104
101
void PHPBackend::tryNextFunction () {
105
102
        RK_TRACE (PHP);
106
103
 
107
 
        if (php_process && (php_process->state () == QProcess::Running) && (!busy) && (!command_stack.isEmpty ())) {
 
104
        if (php_process && (!dead) && (!busy) && (!command_stack.isEmpty ())) {
108
105
        /// clean up previous command if applicable
109
106
                if (command_stack.first ()->complete) {
110
107
                        delete command_stack.takeFirst ();