~clint-fewbar/ubuntu/precise/php5/php5-5.4-merge

« back to all changes in this revision

Viewing changes to sapi/fpm/fpm/fpm_request.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-02-22 09:46:37 UTC
  • mfrom: (1.1.20) (0.3.18 sid)
  • Revision ID: package-import@ubuntu.com-20110222094637-nlu2tvb7oqgaarl0
Tags: 5.3.5-1ubuntu1
* Merge from debian/unstable. Remaining changes:
 - debian/control:
    * Dropped firebird2.1-dev, libc-client-dev, libmcrypt-dev as it is in universe.
    * Dropped libmysqlclient15-dev, build against mysql 5.1.
    * Dropped libcurl-dev not in the archive.
    * Suggest php5-suhosin rather than recommends.
    * Dropped php5-imap, php5-interbase, php5-mcrypt since we have versions 
      already in universe.
    * Dropped libonig-dev and libqgdbm since its in universe. (will be re-added in lucid+1)
    * Dropped locales-all.
  - modulelist: Drop imap, interbase, sybase, and mcrypt.
  - debian/rules:
    * Dropped building of mcrypt, imap, and interbase.
    * Install apport hook for php5.
    * stop mysql instance on clean just in case we failed in tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
136
136
 
137
137
                        fpm_trace_signal(child->pid);
138
138
 
139
 
                        zlog(ZLOG_STUFF, ZLOG_WARNING, "[pool %s] child %d, script '%s' executing too slow (%d.%06d sec), logging",
 
139
                        zlog(ZLOG_WARNING, "[pool %s] child %d, script '%s' executing too slow (%d.%06d sec), logging",
140
140
                                child->wp->config->name, (int) child->pid, purified_script_filename, (int) tv.tv_sec, (int) tv.tv_usec);
141
141
                }
142
142
                else
145
145
                        str_purify_filename(purified_script_filename, slot_c.script_filename, sizeof(slot_c.script_filename));
146
146
                        fpm_pctl_kill(child->pid, FPM_PCTL_TERM);
147
147
 
148
 
                        zlog(ZLOG_STUFF, ZLOG_WARNING, "[pool %s] child %d, script '%s' execution timed out (%d.%06d sec), terminating",
 
148
                        zlog(ZLOG_WARNING, "[pool %s] child %d, script '%s' execution timed out (%d.%06d sec), terminating",
149
149
                                child->wp->config->name, (int) child->pid, purified_script_filename, (int) tv.tv_sec, (int) tv.tv_usec);
150
150
                }
151
151
        }
154
154
 
155
155
int fpm_request_is_idle(struct fpm_child_s *child) /* {{{ */
156
156
{
157
 
        struct fpm_shm_slot_s *slot;
158
 
        struct fpm_shm_slot_s slot_c;
159
 
 
160
 
        slot = fpm_shm_slot(child);
161
 
        if (!fpm_shm_slots_acquire(slot, 1)) {
162
 
                return -1;
163
 
        }
164
 
 
165
 
        slot_c = *slot;
166
 
        fpm_shm_slots_release(slot);
167
 
        return(!slot_c.accepted.tv_sec && !slot_c.accepted.tv_usec ? 1 : 0);
 
157
        struct fpm_shm_slot_s slot;
 
158
 
 
159
        /* no need in atomicity here */
 
160
        slot = *fpm_shm_slot(child);
 
161
 
 
162
        return slot.request_stage == FPM_REQUEST_ACCEPTING;
168
163
}
169
164
/* }}} */