Browse Source

- fix bug #37635 (parameter of pcntl signal handler is trashed)

PECL_OPENSSL
Michael Wallner 20 years ago
parent
commit
258351c30a
  1. 5
      NEWS
  2. 11
      ext/pcntl/pcntl.c

5
NEWS

@ -49,10 +49,11 @@ PHP NEWS
- Added RFC2397 (data: stream) support. (Marcus)
- Fixed memory leaks in openssl streams context options (Pierre)
- Fixed handling of extremely long paths inside tempnam() function. (Ilia)
- Fixed bug #37635 (parameter of pcntl signal handler is trashed). (Mike)
- Fixed bug #37632 (Protected method access problem). (Marcus)
- Fixed bug #37616: DATE_RFC822 does not product RFC 822 dates. (Hannes
Magnusson, Derick)
- Fixed bug #37620 (mysqli_ssl_set validation is innappropriate). (Georg)
- Fixed bug #37616 (DATE_RFC822 does not product RFC 822 dates).
(Hannes Magnusson, Derick)
- Fixed bug #37614 (Class name lowercased in error message). (Johannes)
- Fixed bug #37587 (var without attribute causes segfault). (Marcus)
- Fixed bug #37586 (Bumped minimum PCRE version to 6.6, needed for recursion

11
ext/pcntl/pcntl.c

@ -693,16 +693,19 @@ void pcntl_tick_handler()
PCNTL_G(head) = NULL; /* simple stores are atomic */
/* Allocate */
MAKE_STD_ZVAL(param);
MAKE_STD_ZVAL(retval);
while (queue) {
if (zend_hash_index_find(&PCNTL_G(php_signal_table), queue->signo, (void **) &handle)==SUCCESS) {
MAKE_STD_ZVAL(retval);
MAKE_STD_ZVAL(param);
ZVAL_NULL(retval);
ZVAL_LONG(param, queue->signo);
/* Call php signal handler - Note that we do not report errors, and we ignore the return value */
/* FIXME: this is probably broken when multiple signals are handled in this while loop (retval) */
call_user_function(EG(function_table), NULL, *handle, retval, 1, &param TSRMLS_CC);
zval_ptr_dtor(&param);
zval_ptr_dtor(&retval);
}
next = queue->next;
@ -713,10 +716,6 @@ void pcntl_tick_handler()
/* Re-enable queue */
PCNTL_G(processing_signal_queue) = 0;
/* Clean up */
efree(param);
efree(retval);
}

Loading…
Cancel
Save