to avoid getpid() calls at request time
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92231
13f79535-47bb-0310-9956-
ffa450edef68
#define SSLConnLogApplies(sslconn, level) (sslconn->log_level >= level)
typedef struct {
+ pid_t pid;
apr_pool_t *pPool;
BOOL bFixed;
int nInitCount;
void ssl_init_Child(apr_pool_t *p, server_rec *s)
{
+ SSLModConfigRec *mc = myModConfig(s);
+ mc->pid = getpid(); /* only call getpid() once per-process */
+
/* open the mutex lockfile */
ssl_mutex_reinit(s, p);
return;
/*
* seed in the current process id (usually just 4 bytes)
*/
- pid = getpid();
+ pid = mc->pid;
l = sizeof(pid_t);
RAND_seed((unsigned char *)&pid, l);
nDone += l;