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

Abierto
#10,058 5 comentarios 0 reacciones 1 asignado Ver en GitHub

@bukka ya está trabajando en esto.

Desde el 6/12/2022.

Bug SAPI: fpm
Lenguaje dominante
C
Estrellas
40.4k
Forks
8.1k
Merge medio
2 d 13 h
PR fusionados (30 d)
96

Descripción

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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.