Bug #80992 [NEW]: fork() don't close fpm_globals.listening_socket

From: Date: Tue, 27 Apr 2021 08:02:10 +0000
Subject: Bug #80992 [NEW]: fork() don't close fpm_globals.listening_socket
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-233585@lists.php.net to get a copy of this message
From: vladimir at helesic dot cz Operating system: linux PHP version: Irrelevant Package: FPM related Bug Type: Bug Bug description:fork() don't close fpm_globals.listening_socket Description: ------------ When we use php fpm with listening on tcp port, and run other long running subprocess by proc_open, this process have also open socket for listening, after restart fpm, this socket stay listening by this process and can't start with classic "ERROR: unable to bind listening socket for address 'port number': Address already in use" We found that problem is in missing FD_CLOEXEC flag for this socket(after dup()). after setting this flag, all is ok. patch is below and simple and applicable for all version php. -- Edit bug report at https://bugs.php.net/bug.php?id=80992&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80992&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80992&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80992&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80992&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80992&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80992&r=support Expected behavior: https://bugs.php.net/fix.php?id=80992&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80992&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80992&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80992&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80992&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80992&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80992&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80992&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80992&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80992&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80992&r=mysqlcfg

« previous php.bugs (#233585) next »