提交 46f9edd8 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Minor changes.

上级 a8037768
...@@ -15,18 +15,11 @@ Loop::Loop() ...@@ -15,18 +15,11 @@ Loop::Loop()
MS_TRACE(); MS_TRACE();
// Set the signals handler. // Set the signals handler.
try
{
this->signalsHandler = new SignalsHandler(this); this->signalsHandler = new SignalsHandler(this);
// Add signals to handle. // Add signals to handle.
this->signalsHandler->AddSignal(SIGINT, "INT"); this->signalsHandler->AddSignal(SIGINT, "INT");
this->signalsHandler->AddSignal(SIGTERM, "TERM"); this->signalsHandler->AddSignal(SIGTERM, "TERM");
}
catch (const MediaSoupError &error)
{
MS_THROW_ERROR("error creating the SignalsHandler: %s", error.what());
}
MS_DEBUG("SignalsHandler ready");
MS_DEBUG("starting libuv loop"); MS_DEBUG("starting libuv loop");
DepLibUV::RunLoop(); DepLibUV::RunLoop();
......
...@@ -163,10 +163,6 @@ void Settings::SetConfiguration(int argc, char* argv[]) ...@@ -163,10 +163,6 @@ void Settings::SetConfiguration(int argc, char* argv[])
} }
} }
// Ensure there are no more command line arguments after parsed options.
if (optind != argc)
MS_THROW_ERROR("there are remaining arguments after parsing command line options");
/* Post configuration. */ /* Post configuration. */
// RTC must have at least 'listenIPv4' or 'listenIPv6'. // RTC must have at least 'listenIPv4' or 'listenIPv6'.
......
...@@ -26,8 +26,14 @@ static void destroy(); ...@@ -26,8 +26,14 @@ static void destroy();
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
// TODO: set the process name/id. std::string id;
Logger::Init("main");
if (argc == 1)
MS_EXIT_FAILURE("process id must be given as first argument");
id = std::string(argv[1]);
Logger::Init(id);
#if defined(MS_LITTLE_ENDIAN) #if defined(MS_LITTLE_ENDIAN)
MS_DEBUG("detected Little-Endian CPU"); MS_DEBUG("detected Little-Endian CPU");
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论