]> granicus.if.org Git - php/commitdiff
fpm master/child process rename, enable on mac os.
authorDavid CARLIER <devnexen@gmail.com>
Mon, 15 Feb 2021 21:00:38 +0000 (21:00 +0000)
committerJakub Zelenka <bukka@php.net>
Sun, 21 Mar 2021 18:36:12 +0000 (18:36 +0000)
Note the change appears mainly in command like ps.

sapi/fpm/fpm/fpm_env.c

index e9a59d2daa0b5b5ef03470ef67b75facf8cdfb69..a9227f8c7dbca9010035a2fd89eadb09340e8de0 100644 (file)
@@ -13,7 +13,7 @@
 #include "fpm.h"
 
 #ifndef HAVE_SETPROCTITLE
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
 static char **fpm_env_argv = NULL;
 static size_t fpm_env_argv_len = 0;
 #endif
@@ -122,8 +122,7 @@ void fpm_env_setproctitle(char *title) /* {{{ */
        setproctitle_fast("%s", title);
 #elif defined(HAVE_SETPROCTITLE)
        setproctitle("%s", title);
-#else
-#ifdef __linux__
+#elif defined(__linux__) || defined(__APPLE__)
        size_t prefixlen = strlen(SETPROCTITLE_PREFIX);
        if (fpm_env_argv != NULL && fpm_env_argv_len > prefixlen + 3) {
                memset(fpm_env_argv[0], 0, fpm_env_argv_len);
@@ -132,7 +131,6 @@ void fpm_env_setproctitle(char *title) /* {{{ */
                fpm_env_argv[1] = NULL;
        }
 #endif
-#endif
 }
 /* }}} */
 
@@ -208,7 +206,7 @@ int fpm_env_init_main() /* {{{ */
                }
        }
 #ifndef HAVE_SETPROCTITLE
-#ifdef __linux__
+#if defined(__linux__) || defined(__APPLE__)
        int i;
        char *first = NULL;
        char *last = NULL;