summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyungwook Tak <k.tak@samsung.com>2016-11-22 14:20:54 +0900
committerKyungwook Tak <k.tak@samsung.com>2016-11-22 14:20:54 +0900
commit7308351ee6a153985f1903cfbcdc0d37463427b1 (patch)
tree4ff0dcaddd783683361a70ca39b5a07f89498911
parent04936fecf9678da1b974c1e002b03680ed637c6b (diff)
downloadcsr-framework-7308351ee6a153985f1903cfbcdc0d37463427b1.tar.gz
csr-framework-7308351ee6a153985f1903cfbcdc0d37463427b1.tar.bz2
csr-framework-7308351ee6a153985f1903cfbcdc0d37463427b1.zip
Use ELM_MAIN macro for main function
ELM_MAIN() macro is highly recommended instead of code main function manually Change-Id: I0a837302d56901e771d566b038a49b2c2f76d029 Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
-rw-r--r--src/framework/ui/popup/main.cpp23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/framework/ui/popup/main.cpp b/src/framework/ui/popup/main.cpp
index 435a954..a3f257f 100644
--- a/src/framework/ui/popup/main.cpp
+++ b/src/framework/ui/popup/main.cpp
@@ -49,35 +49,15 @@ void updateLanguage(void)
setlocale(LC_ALL, "");
}
-struct ElmRaii {
- ElmRaii(int argc, char **argv)
- {
- DEBUG("elm_init()");
- elm_init(argc, argv);
- }
-
- virtual ~ElmRaii()
- {
- DEBUG("elm_shutdown()");
- /* TODO: do shutdown.
- * shutdown generates segmentation fault by unknown reason.
- */
- // elm_shutdown();
- }
-};
-
} // namespace anonymous
-int main(int argc, char **argv)
+int elm_main(int, char **)
{
try {
Csr::Audit::Logger::setTag("CSR_POPUP");
INFO("CSR popup service start!");
- /* init/shutdown elm automatically */
- ElmRaii elmRaii(argc, argv);
-
std::signal(SIGTERM, [](int signal) {
WARN("Popup is terminated by signal[" << strsignal(signal) << "]");
/* cleanup and close up stuff here */
@@ -101,3 +81,4 @@ int main(int argc, char **argv)
return -1;
}
}
+ELM_MAIN()