[Opalvoip-svn] SF.net SVN: opalvoip:[31537] ptlib/branches/v2_14/src/ptlib/unix/svcproc. cxx
Brought to you by:
csoutheren,
rjongbloed
From: <rjo...@us...> - 2014-02-19 04:51:39
|
Revision: 31537 http://sourceforge.net/p/opalvoip/code/31537 Author: rjongbloed Date: 2014-02-19 04:51:36 +0000 (Wed, 19 Feb 2014) Log Message: ----------- Fixed passing through arguments after service process argments are parsed. Modified Paths: -------------- ptlib/branches/v2_14/src/ptlib/unix/svcproc.cxx Modified: ptlib/branches/v2_14/src/ptlib/unix/svcproc.cxx =================================================================== --- ptlib/branches/v2_14/src/ptlib/unix/svcproc.cxx 2014-02-19 03:17:42 UTC (rev 31536) +++ ptlib/branches/v2_14/src/ptlib/unix/svcproc.cxx 2014-02-19 04:51:36 UTC (rev 31537) @@ -297,7 +297,10 @@ { ifstream pidfile(pidfilename); if (!pidfile.is_open()) { - cout << "Could not open pid file: \"" << pidfilename << "\"" + if (args.HasOption('s')) + cout << "Process has not been started." << endl; + else + cout << "Could not open pid file: \"" << pidfilename << "\"" " - " << strerror(errno) << endl; return 1; } @@ -427,6 +430,16 @@ } #endif + // Remove the service arguments + if (args.GetCount() == 0) + args.SetArgs(""); + else { + PStringArray programArgs(args.GetCount()); + for (PINDEX arg = 0; arg < args.GetCount(); ++arg) + programArgs = args[arg]; + args.SetArgs(programArgs); + } + // We are a service, don't want to get blocked on input from stdin during asserts if (!m_debugMode) ::close(STDIN_FILENO); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |