Change internal modules work 35/107435/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 tizen_3.0_tv accepted/tizen/3.0.m2/mobile/20170104.141409 accepted/tizen/3.0.m2/tv/20170104.142012 accepted/tizen/3.0.m2/wearable/20170104.142306 accepted/tizen/3.0/common/20161228.162501 accepted/tizen/3.0/ivi/20161228.095940 accepted/tizen/3.0/mobile/20161228.095844 accepted/tizen/3.0/tv/20161228.095905 accepted/tizen/3.0/wearable/20161228.095922 submit/tizen_3.0.m2/20170104.093751 submit/tizen_3.0/20161228.075358
authorSunmin Lee <sunm.lee@samsung.com>
Wed, 28 Dec 2016 05:35:13 +0000 (14:35 +0900)
committerSunmin Lee <sunm.lee@samsung.com>
Wed, 28 Dec 2016 05:35:13 +0000 (14:35 +0900)
- crash-pipe: create core file only
- crash-stack: create .info file (call-stack)

Change-Id: I71ba012f426e5d055f3acfc2b2820b5fcb2e17ec
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
src/crash-manager/crash-manager.c

index 8c64d78..c3c2ed0 100644 (file)
@@ -422,43 +422,27 @@ static void dump_system_state(void)
 
 static void execute_crash_modules(int argc, char *argv[], int debug)
 {
-       int ret, i, length;
-       char arg_append[PATH_MAX];
+       int ret;
        char command[PATH_MAX];
 
-       length = 0;
-       arg_append[0] = '\0';
-       for (i = 1; i < argc && length + strlen(argv[i]) + 1 < PATH_MAX; i++) {
-               strncat(arg_append, argv[i], strlen(argv[i]));
-               strncat(arg_append, " ", 1);
-               length += strlen(argv[i]) + 1;
-       }
-
        /* Execute crash-pipe */
-       if (debug)
-               ret = snprintf(command, sizeof(command),
-                               "%s --save-core %s --report %s > %s",
-                               CRASH_PIPE_PATH,
-                               crash_info.core_path, arg_append,
-                               crash_info.info_path);
-       else
+       if (debug) {
                ret = snprintf(command, sizeof(command),
-                               "%s --report %s > %s",
+                               "%s --save-core %s",
                                CRASH_PIPE_PATH,
-                               arg_append,
-                               crash_info.info_path);
-       if (ret < 0) {
-               _E("Failed to snprintf for crash-pipe command");
-               return;
+                               crash_info.core_path);
+               if (ret < 0) {
+                       _E("Failed to snprintf for crash-pipe command");
+                       return;
+               }
+               system_command(command);
        }
-       system_command(command);
 
 #ifdef TIZEN_FEATURE_PTRACE_CALLSTACK
        /* Execute crash-stack */
-       /*
        if (argc > 8)
                ret = snprintf(command, sizeof(command),
-                               "%s --pid %s --tid %s --sig %s >> %s",
+                               "%s --pid %s --tid %s --sig %s > %s",
                                CRASH_STACK_PATH,
                                crash_info.pid_info,
                                crash_info.tid_info,
@@ -466,7 +450,7 @@ static void execute_crash_modules(int argc, char *argv[], int debug)
                                crash_info.info_path);
        else
                ret = snprintf(command, sizeof(command),
-                               "%s --pid %s --sig %s >> %s",
+                               "%s --pid %s --sig %s > %s",
                                CRASH_STACK_PATH,
                                crash_info.pid_info,
                                crash_info.sig_info,
@@ -476,7 +460,6 @@ static void execute_crash_modules(int argc, char *argv[], int debug)
                return;
        }
        system_command(command);
-       */
 #endif /* TIZEN_FEATURE_PTRACE_CALLSTACK */
 }