Changeset 3432 for trunk/src/kmk/main.c


Ignore:
Timestamp:
Sep 1, 2020, 3:17:57 PM (5 years ago)
Author:
bird
Message:

kmk: Quick output hack to repeat the failure output at the end of die() as it may easily get lost in output from other jobs (problem on systems with lots of cores).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/main.c

    r3396 r3432  
    43594359
    43604360void
     4361#ifdef KMK
     4362die_with_job_output (int status, struct output *out)
     4363#else
    43614364die (int status)
     4365#endif
    43624366{
    43634367  static char dying = 0;
    43644368#ifdef KMK
    43654369  static char need_2nd_error = 0;
     4370  static char need_2nd_error_output = 0;
    43664371#endif
    43674372
     
    43814386              || print_data_base_flag
    43824387              || print_stats_flag))
    4383         need_2nd_error = 1;
     4388        {
     4389          need_2nd_error = 1;
     4390          need_2nd_error_output = job_slots_used > 2
     4391                               && out == NULL
     4392                               && out != &make_sync;
     4393        }
    43844394#endif /* KMK */
    43854395
     
    44574467  if (need_2nd_error != 0)
    44584468    ON (error, NILF, _("*** Exiting with status %d"), status);
     4469  if (out)
     4470  {
     4471      out->dont_truncate = 0;
     4472      if (need_2nd_error_output)
     4473        output_dump (out);
     4474      output_close (out);
     4475  }
    44594476#endif
    44604477
    44614478  exit (status);
    44624479}
     4480
     4481#ifdef KMK
     4482void die(int status)
     4483{
     4484    die_with_job_output (status, NULL);
     4485}
     4486#endif
Note: See TracChangeset for help on using the changeset viewer.