From 34bc7c0cfdc3d8e674cd68d1a1be450d7a0c4e73 Mon Sep 17 00:00:00 2001 From: "roberto@mrspurr" Date: Sun, 16 Oct 2011 09:54:35 +0200 Subject: [PATCH] check for procname --- utils.c | 6 +++++- uwsgi.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) 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