From: Alex Rousskov Date: Wed, 7 Jul 2010 03:17:47 +0000 (-0600) Subject: Moved KidIdentifier to globals to make pinger happy. X-Git-Tag: SQUID_3_2_0_1~89 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=710d3d1d9736cad987dbc1bc3f1262b31909b377;p=thirdparty%2Fsquid.git 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. --- diff --git a/src/globals.h b/src/globals.h index 7eea3cb10d..82431a7154 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 ede9d15d77..ad0da3786e 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 dce7f14fbc..d2432a9d51 100644 --- a/src/ipc/Kids.h +++ b/src/ipc/Kids.h @@ -49,7 +49,6 @@ private: 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 */