diff --git a/utils.c b/utils.c index 06b9a1ac..ebd854a0 100644 --- a/utils.c +++ b/utils.c @@ -3190,6 +3190,7 @@ void uwsgi_apply_config_pass(char symbol, char*(*hook)(char *) ) { void uwsgi_set_processname(char *name) { +#if defined(__linux__) || defined(__sun__) char *pos = uwsgi.orig_argv[0]; size_t amount = 0; @@ -3213,18 +3214,21 @@ void uwsgi_set_processname(char *name) { } memset(pos, ' ', uwsgi.max_procname-amount); +#endif } // this is a wrapper for fork restoring original argv pid_t uwsgi_fork(char *name) { - int i; pid_t pid = fork(); if (pid == 0) { +#if defined(__linux__) || defined(__sun__) + int i; for(i=0;i