summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/IceBox/ServiceManagerI.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/cpp/src/IceBox/ServiceManagerI.cpp b/cpp/src/IceBox/ServiceManagerI.cpp
index 14ab57b8426..fcde0f88d1f 100644
--- a/cpp/src/IceBox/ServiceManagerI.cpp
+++ b/cpp/src/IceBox/ServiceManagerI.cpp
@@ -271,6 +271,16 @@ IceBox::ServiceManagerI::start(const string& service, const string& entryPoint,
PropertiesPtr serviceProperties = properties->clone();
+ //
+ // Append the service name to the program name if not empty.
+ //
+ string name = serviceProperties->getProperty("Ice.ProgramName");
+ if(name != service)
+ {
+ name = name.empty() ? service : name + "-" + service;
+ serviceProperties->setProperty("Ice.ProgramName", name);
+ }
+
PropertiesPtr fileProperties = createProperties(serviceArgs);
serviceProperties->parseCommandLineOptions("", fileProperties->getCommandLineOptions());