php / php/php-src

If "php-fpm --nodaemonize" is called to be sent into background it forces itself into FG and hangs the calling process

Đang mở
#10,058 5 bình luận 0 reaction 1 người được giao Xem trên GitHub

@bukka đang làm issue này rồi.

Từ ngày 6/12/2022.

Bug SAPI: fpm
Ngôn ngữ chính
C
Star
40.4k
Fork
8.1k
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
96

Mô tả

Description

php-fpm process executed in a FG mode using --nodaemonize but sent to background using shell's &, is puting itself back into FG and locks the calling process, completely breaking the intended logic.

The following bash shell code:

#!/bin/bash

function fpm_LaunchProcess()
{
    /usr/sbin/php-fpm --nodaemonize 2>&1>/dev/null &
    echo "$!"
}

pid=$(fpm_LaunchProcess)
echo "$pid"

Expected:
Printing the executed FPM process pid.

Actual behaviour:
Process is stalled due to php-fpm coming back into FG by itself

The bug added sometime in between PHP 8.0.23 to 8.0.25(Included).
PHP 8.1 is affected too and I think the issue added in the same releases window as mentioned 8.0 versions.

Also adding a 'nohup' before php-fpm did not help.

PHP Version

PHP 8.0.26

Operating System

CentOS 7.9

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.