Skip to content

Commit 1c49d32

Browse files
Apply suggestions from code review
certainly shouldn't cause any side effects since the only way this code path is hit is if something calls `pcntl_fork` (or an extension forks). Co-authored-by: Alexander Stecher <45872305+AlliBalliBaba@users.noreply.github.com> Signed-off-by: Marc <m@pyc.ac>
1 parent 679a48e commit 1c49d32

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

frankenphp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ static void *php_thread(void *arg) {
11011101
/* Execute the PHP script, potential bailout to zend_catch */
11021102
php_execute_script(&file_handle);
11031103
#ifndef PHP_WIN32
1104-
if (is_forked_child) {
1104+
if (UNEXPECTED(is_forked_child)) {
11051105
_exit(EG(exit_status));
11061106
}
11071107
#endif
@@ -1122,7 +1122,7 @@ static void *php_thread(void *arg) {
11221122
}
11231123
zend_catch {
11241124
#ifndef PHP_WIN32
1125-
if (is_forked_child) {
1125+
if (UNEXPECTED(is_forked_child)) {
11261126
_exit(EG(exit_status));
11271127
}
11281128
#endif

0 commit comments

Comments
 (0)