am 05f257fe: Merge "Ignore SIGPIPE is some of the tools used via bugreport" into jb-dev

* commit '05f257febc28a4d891dde6f66a431631c58815d1':
  Ignore SIGPIPE is some of the tools used via bugreport
This commit is contained in:
JP Abgrall 2012-05-14 19:41:21 -07:00 committed by Android Git Automerger
commit 4c24461035
2 changed files with 3 additions and 0 deletions

View File

@ -311,6 +311,8 @@ int main(int argc, char *argv[]) {
ALOGI("begin\n"); ALOGI("begin\n");
signal(SIGPIPE, SIG_IGN);
/* set as high priority, and protect from OOM killer */ /* set as high priority, and protect from OOM killer */
setpriority(PRIO_PROCESS, 0, -20); setpriority(PRIO_PROCESS, 0, -20);
FILE *oom_adj = fopen("/proc/self/oom_adj", "w"); FILE *oom_adj = fopen("/proc/self/oom_adj", "w");

View File

@ -28,6 +28,7 @@ static int sort_func(const String16* lhs, const String16* rhs)
int main(int argc, char* const argv[]) int main(int argc, char* const argv[])
{ {
signal(SIGPIPE, SIG_IGN);
sp<IServiceManager> sm = defaultServiceManager(); sp<IServiceManager> sm = defaultServiceManager();
fflush(stdout); fflush(stdout);
if (sm == NULL) { if (sm == NULL) {