From: Jeff Trawick Date: Fri, 2 Mar 2001 18:52:23 +0000 (+0000) Subject: fix the type of ap_my_pid and make it static since it is used X-Git-Tag: 2.0.14~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e320f6997646d2d43b43df851fe4993a81161d75;p=thirdparty%2Fapache%2Fhttpd.git fix the type of ap_my_pid and make it static since it is used in only one file per build (prefork.c or threaded.c) PR: 6980 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88423 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/mpm/prefork/mpm.h b/server/mpm/prefork/mpm.h index df62184d83c..0f4163ece3b 100644 --- a/server/mpm/prefork/mpm.h +++ b/server/mpm/prefork/mpm.h @@ -74,6 +74,5 @@ extern int ap_threads_per_child; extern int ap_max_daemons_limit; extern server_rec *ap_server_conf; -extern int ap_my_pid; extern char ap_coredump_dir[MAX_STRING_LEN]; #endif /* APACHE_MPM_PREFORK_H */ diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c index 6b3b5f41af5..6693f371043 100644 --- a/server/mpm/prefork/prefork.c +++ b/server/mpm/prefork/prefork.c @@ -172,7 +172,7 @@ static int one_process = 0; static apr_pool_t *pconf; /* Pool for config stuff */ static apr_pool_t *pchild; /* Pool for httpd child stuff */ -int ap_my_pid; /* it seems silly to call getpid all the time */ +static pid_t ap_my_pid; /* it seems silly to call getpid all the time */ #ifndef MULTITHREAD static int my_child_num; #endif diff --git a/server/mpm/threaded/mpm.h b/server/mpm/threaded/mpm.h index be4ada3ad47..0f47e049569 100644 --- a/server/mpm/threaded/mpm.h +++ b/server/mpm/threaded/mpm.h @@ -71,7 +71,6 @@ extern int ap_threads_per_child; extern int ap_max_requests_per_child; extern int ap_max_daemons_limit; -extern unsigned int ap_my_pid; extern server_rec *ap_server_conf; extern char ap_coredump_dir[MAX_STRING_LEN]; diff --git a/server/mpm/threaded/threaded.c b/server/mpm/threaded/threaded.c index ecdf8929a34..fe591b77071 100644 --- a/server/mpm/threaded/threaded.c +++ b/server/mpm/threaded/threaded.c @@ -155,7 +155,7 @@ int raise_sigstop_flags; static apr_pool_t *pconf; /* Pool for config stuff */ static apr_pool_t *pchild; /* Pool for httpd child stuff */ -unsigned int ap_my_pid; /* Linux getpid() doesn't work except in main +static pid_t ap_my_pid; /* Linux getpid() doesn't work except in main thread. Use this instead */ /* Keep track of the number of worker threads currently active */ static int worker_thread_count;