[php-src] Issue #21740: Use of PIDFile= in php-fpm.service
[email protected] (marcosfrm)
| Newsgroups | php.bugs |
|---|---|
| Message-ID | <[email protected]> |
Issue: https://github.com/php/php-src/issues/21740
Author: marcosfrm
### Description
When using `Type=simple` or `Type=notify` services, the process executed in `ExecStart=` is monitored directly by systemd and is automatically the main PID. The use of `PIDFile=` is useless and discouraged by the systemd.service(5) manual page:
> Note that PID files should be avoided in modern projects. Use Type=notify, Type=notify-reload or Type=simple where possible, which does not require use of PID files to determine the main process of a service and avoids needless forking.
Source: https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#PIDFile=
Furthermore, the default configuration of `php-fpm.conf` has `pid =` commented out, which is equivalent to not having a PID file.
From systemd's point of view, the service remains exactly the same without the `PIDFile=` directive. I suggest, therefore, that it be dropped.
### PHP Version
```plain
PHP 8.5.5 (cli) (built: Apr 8 2026 14:36:19) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.5.5, Copyright (c) Zend Technologies
with Zend OPcache v8.5.5, Copyright (c), by Zend Technologies
```
### Operating System
_No response_