Skip to content

Commit d54fa6f

Browse files
devnexenbukka
authored andcommitted
fpm master/child process rename, enable on mac os.
Note the change appears mainly in command like ps.
1 parent 661731d commit d54fa6f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

sapi/fpm/fpm/fpm_env.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "fpm.h"
1414

1515
#ifndef HAVE_SETPROCTITLE
16-
#ifdef __linux__
16+
#if defined(__linux__) || defined(__APPLE__)
1717
static char **fpm_env_argv = NULL;
1818
static size_t fpm_env_argv_len = 0;
1919
#endif
@@ -122,8 +122,7 @@ void fpm_env_setproctitle(char *title) /* {{{ */
122122
setproctitle_fast("%s", title);
123123
#elif defined(HAVE_SETPROCTITLE)
124124
setproctitle("%s", title);
125-
#else
126-
#ifdef __linux__
125+
#elif defined(__linux__) || defined(__APPLE__)
127126
size_t prefixlen = strlen(SETPROCTITLE_PREFIX);
128127
if (fpm_env_argv != NULL && fpm_env_argv_len > prefixlen + 3) {
129128
memset(fpm_env_argv[0], 0, fpm_env_argv_len);
@@ -132,7 +131,6 @@ void fpm_env_setproctitle(char *title) /* {{{ */
132131
fpm_env_argv[1] = NULL;
133132
}
134133
#endif
135-
#endif
136134
}
137135
/* }}} */
138136

@@ -208,7 +206,7 @@ int fpm_env_init_main() /* {{{ */
208206
}
209207
}
210208
#ifndef HAVE_SETPROCTITLE
211-
#ifdef __linux__
209+
#if defined(__linux__) || defined(__APPLE__)
212210
int i;
213211
char *first = NULL;
214212
char *last = NULL;

0 commit comments

Comments
 (0)