- if (p1 != p)
- {
- yaz_log(LOG_FATAL, "p1=%d != p=%d", p1, p);
- exit(1);
- }
- if (WIFSIGNALED(status))
- {
- switch(WTERMSIG(status)) {
- case SIGILL:
- yaz_log(LOG_WARN, "Received SIGILL from child %ld", (long) p);
- cont = 1;
- break;
- case SIGABRT:
- yaz_log(LOG_WARN, "Received SIGABRT from child %ld", (long) p);
- cont = 1;
- break ;
- case SIGSEGV:
- yaz_log(LOG_WARN, "Received SIGSEGV from child %ld", (long) p);
- cont = 1;
- break;
- case SIGBUS:
- yaz_log(LOG_WARN, "Received SIGBUS from child %ld", (long) p);
- cont = 1;
- break;
- case SIGTERM:
- yaz_log(LOG_LOG, "Received SIGTERM from child %ld",
- (long) p);
- cont = 0;
- break;
- default:
- yaz_log(LOG_WARN, "Received SIG %d from child %ld",
- WTERMSIG(status), (long) p);
- cont = 0;
- }
- }
- else if (status == 0)
- cont = 0;
- else
- {
- yaz_log(LOG_LOG, "Exit %d from child %ld", status, (long) p);
- cont = 1;
- }
- if (cont)
- sleep(1 + run/5);
- run++;
+ if (p1 != p)
+ {
+ yaz_log(YLOG_FATAL, "p1=%d != p=%d", p1, p);
+ exit(1);
+ }
+ if (WIFSIGNALED(status))
+ {
+ switch(WTERMSIG(status)) {
+ case SIGILL:
+ yaz_log(YLOG_WARN, "Received SIGILL from child %ld", (long) p);
+ cont = 1;
+ break;
+ case SIGABRT:
+ yaz_log(YLOG_WARN, "Received SIGABRT from child %ld", (long) p);
+ cont = 1;
+ break ;
+ case SIGSEGV:
+ yaz_log(YLOG_WARN, "Received SIGSEGV from child %ld", (long) p);
+ cont = 1;
+ break;
+ case SIGBUS:
+ yaz_log(YLOG_WARN, "Received SIGBUS from child %ld", (long) p);
+ cont = 1;
+ break;
+ case SIGTERM:
+ yaz_log(YLOG_LOG, "Received SIGTERM from child %ld",
+ (long) p);
+ cont = 0;
+ break;
+ default:
+ yaz_log(YLOG_WARN, "Received SIG %d from child %ld",
+ WTERMSIG(status), (long) p);
+ cont = 0;
+ }
+ }
+ else if (status == 0)
+ cont = 0;
+ else
+ {
+ yaz_log(YLOG_LOG, "Exit %d from child %ld", status, (long) p);
+ cont = 1;
+ }
+ if (cont)
+ sleep(1 + run/5);
+ run++;