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

Ouverte
#10,058 5 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@bukka y travaille déjà.

Depuis le 6/12/2022.

Bug SAPI: fpm
Langage dominant
C
Étoiles
40.4k
Forks
8.1k
Merge moyen
2 j 13 h
PR mergées (30 j)
96

Description

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

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.