int main(int argc, char *argv[])
{
- // Output on stdout will be flushed after every newline character,
- // even if it is redirected to a pipe. This is useful for running
- // from a script and parsing output.
- // (Standard behavior of stdlib is to use full buffering when
- // redirected to a pipe, which means even after an end of line
- // the output may not be flushed).
- setlinebuf(stdout);
-
- // Check and re-set the file open limitation
- struct rlimit rlim;
- if (getrlimit(RLIMIT_NOFILE, &rlim) != -1) {
- LogDebug("RLIMIT_NOFILE sft(" << rlim.rlim_cur << ")" );
- LogDebug("RLIMIT_NOFILE hrd(" << rlim.rlim_max << ")" );
-
- if (rlim.rlim_cur < NOFILE_CNT_FOR_INSTALLER) {
- rlim.rlim_cur = NOFILE_CNT_FOR_INSTALLER;
- rlim.rlim_max = NOFILE_CNT_FOR_INSTALLER;
- if (setrlimit(RLIMIT_NOFILE, &rlim) == -1) {
- LogError("setrlimit is fail!!");
+ UNHANDLED_EXCEPTION_HANDLER_BEGIN
+ {
+ // Output on stdout will be flushed after every newline character,
+ // even if it is redirected to a pipe. This is useful for running
+ // from a script and parsing output.
+ // (Standard behavior of stdlib is to use full buffering when
+ // redirected to a pipe, which means even after an end of line
+ // the output may not be flushed).
+ setlinebuf(stdout);
+
+ // Check and re-set the file open limitation
+ struct rlimit rlim;
+ if (getrlimit(RLIMIT_NOFILE, &rlim) != -1) {
+ LogDebug("RLIMIT_NOFILE sft(" << rlim.rlim_cur << ")" );
+ LogDebug("RLIMIT_NOFILE hrd(" << rlim.rlim_max << ")" );
+
+ if (rlim.rlim_cur < NOFILE_CNT_FOR_INSTALLER) {
+ rlim.rlim_cur = NOFILE_CNT_FOR_INSTALLER;
+ rlim.rlim_max = NOFILE_CNT_FOR_INSTALLER;
+ if (setrlimit(RLIMIT_NOFILE, &rlim) == -1) {
+ LogError("setrlimit is fail!!");
+ }
}
+ } else {
+ LogError("getrlimit is fail!!");
}
- } else {
- LogError("getrlimit is fail!!");
- }
- // set evas backend type for emulator
- // popup isn't showed in the emulator,
- // if backend isn't set to SW backend
- if (GlobalSettings::IsEmulator()) {
- if (setenv("ELM_ENGINE", "x11", 1)) {
- LogDebug("Enable backend");
+ // set evas backend type for emulator
+ // popup isn't showed in the emulator,
+ // if backend isn't set to SW backend
+ if (GlobalSettings::IsEmulator()) {
+ if (setenv("ELM_ENGINE", "x11", 1)) {
+ LogDebug("Enable backend");
+ }
}
- }
- WrtInstaller app(argc, argv);
- int ret = app.Exec();
- LogDebug("App returned: " << ret);
- ret = app.getReturnStatus();
- LogDebug("WrtInstaller returned: " << ret);
- return ret;
+ WrtInstaller app(argc, argv);
+ int ret = app.Exec();
+ LogDebug("App returned: " << ret);
+ ret = app.getReturnStatus();
+ LogDebug("WrtInstaller returned: " << ret);
+ return ret;
+ }
+ UNHANDLED_EXCEPTION_HANDLER_END
}