Skip to content

Commit

Permalink
Moved KidIdentifier to globals to make pinger happy.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rousskov committed Jul 7, 2010
1 parent 16c8591 commit 710d3d1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion src/ipc/Kids.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

Kids TheKids;
char KidName[NAME_MAX];
int KidIdentifier;

Kids::Kids()
{
Expand Down
1 change: 0 additions & 1 deletion src/ipc/Kids.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 710d3d1

Please sign in to comment.