From 710d3d1d9736cad987dbc1bc3f1262b31909b377 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Tue, 6 Jul 2010 21:17:47 -0600 Subject: [PATCH] Moved KidIdentifier to globals to make pinger happy. Pinger and possibly other optional externals require KidIdentifier via debugs(). Instead of making KidIdentifier global, we could add a "plugin" API to add program-dependent stuff to debugs() and friends, but we should not add that kind of complexity unless really necessary. We could also link pinger with libipc.la but that will probably cause more problems with IPC dependencies. --- src/globals.h | 3 +++ src/ipc/Kids.cc | 1 - src/ipc/Kids.h | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/globals.h b/src/globals.h index 7eea3cb10da..82431a71543 100644 --- a/src/globals.h +++ b/src/globals.h @@ -171,6 +171,9 @@ extern "C" { extern int opt_send_signal; /* -1 */ extern int opt_no_daemon; /* 0 */ +/// current Squid process number (e.g., 4). +/// Zero for SMP-unaware code and in no-SMP mode. + extern int KidIdentifier; /* 0 */ #ifdef __cplusplus } diff --git a/src/ipc/Kids.cc b/src/ipc/Kids.cc index ede9d15d778..ad0da3786e3 100644 --- a/src/ipc/Kids.cc +++ b/src/ipc/Kids.cc @@ -10,7 +10,6 @@ Kids TheKids; char KidName[NAME_MAX]; -int KidIdentifier; Kids::Kids() { diff --git a/src/ipc/Kids.h b/src/ipc/Kids.h index dce7f14fbcb..d2432a9d51c 100644 --- a/src/ipc/Kids.h +++ b/src/ipc/Kids.h @@ -49,7 +49,6 @@ class Kids extern Kids TheKids; ///< All kids being maintained extern char KidName[NAME_MAX]; ///< current Squid process name (e.g., squid2) -extern int KidIdentifier; ///< current Squid process number (e.g., 4) #endif /* SQUID_IPC_KIDS_H */