From e320f6997646d2d43b43df851fe4993a81161d75 Mon Sep 17 00:00:00 2001 From: Jeff Trawick Date: Fri, 2 Mar 2001 18:52:23 +0000 Subject: [PATCH] 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 --- server/mpm/prefork/mpm.h | 1 - server/mpm/prefork/prefork.c | 2 +- server/mpm/threaded/mpm.h | 1 - server/mpm/threaded/threaded.c | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/mpm/prefork/mpm.h b/server/mpm/prefork/mpm.h index df62184d83..0f4163ece3 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 6b3b5f41af..6693f37104 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 be4ada3ad4..0f47e04956 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 ecdf8929a3..fe591b7707 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; -- 2.50.1