crash notify files can have many notify to launch crash-worker
when crash is occured many times at the sametime.
It can make problem of target stuck.
so add limit number of launching crash-worker at the same time.
Change-Id: Ia3a2e107b0d9b18c0eb33280061d8a8d27c35ec8
Signed-off-by: juho <juho80.son@samsung.com>
#include "core/launch.h"
#include "core/devices.h"
#include "core/launch.h"
#include "core/devices.h"
+#define CRASH_WORKER_MAX 3
#define CRASH_PID_MAX 7
#define CRASH_MODE_MAX 2
#define CRASH_TIME_MAX 65
#define CRASH_PID_MAX 7
#define CRASH_MODE_MAX 2
#define CRASH_TIME_MAX 65
static int popup_pid = 0;
FILE *fp;
int ret = -1;
static int popup_pid = 0;
FILE *fp;
int ret = -1;
char linebuffer[CRASH_ARG_MAX] = {0,};
char crash_worker_args[CRASH_ARG_MAX] = {0,};
struct crash_arg parsing_arg;
char linebuffer[CRASH_ARG_MAX] = {0,};
char crash_worker_args[CRASH_ARG_MAX] = {0,};
struct crash_arg parsing_arg;
if (fp == NULL) {
return;
}
if (fp == NULL) {
return;
}
/* launch crash process */
while (fgets(linebuffer, CRASH_ARG_MAX, fp) != NULL) {
len = strlen(linebuffer);
/* launch crash process */
while (fgets(linebuffer, CRASH_ARG_MAX, fp) != NULL) {
len = strlen(linebuffer);
fprintf(fpAdj, "%d", (-17));
fclose(fpAdj);
}
fprintf(fpAdj, "%d", (-17));
fclose(fpAdj);
}
+ count++;
+ if (CRASH_WORKER_MAX <= count)
+ break;
}
if (popup_on) {
if (!is_running_process(popup_pid))
}
if (popup_on) {
if (!is_running_process(popup_pid))