servicemanager: log for service collision
It's pretty easy to accidentally install two instances
of a HAL. We've seen this in HIDL a lot, and we expect
to see it some in AIDL, because we don't have a build
guarantee.
Bug: 247882470
Test: run binderLibTest twice and once and see PID log
Change-Id: I848a767c2b3a4f089fd6742979bd94708cce2c94
diff --git a/cmds/servicemanager/ServiceManager.h b/cmds/servicemanager/ServiceManager.h
index c6db697..07b79f8 100644
--- a/cmds/servicemanager/ServiceManager.h
+++ b/cmds/servicemanager/ServiceManager.h
@@ -74,7 +74,7 @@
int32_t dumpPriority;
bool hasClients = false; // notifications sent on true -> false.
bool guaranteeClient = false; // forces the client check to true
- pid_t debugPid = 0; // the process in which this service runs
+ Access::CallingContext ctx; // process that originally registers this
// the number of clients of the service, including servicemanager itself
ssize_t getNodeStrongRefCount();