Welcome to the Linux Foundation Forum!

Exercise 4.1: Examining Signal Priorities and Execution

Options

When running the code for excercise 4.1 the first segment of the output returns:

Installing signal handler and Raising signal for signal number:

   1   2   3   4   5   6   7   8  --  10  11  12  13  14  15  16
  17  18  --  20  21  22  23  24  25  26  27  28  29  30  31  --  --  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48
  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64

not breaking the line appropriately on item #32

The fix is quite simple. I wonder if there's any way I could send a patch.

Comments

  • coop
    coop Posts: 915
    Options

    sure. It is the line
    if (signum % 16 == 0)
    printf("\n");
    failing because 32 doesn't get processed :) That "feature" has probably been there for something like 15+ years since the first version of the code was written, and I've either never noticed the overflow, or forgotten about it, or did not want to do something too ugly or complicated since it is only cosmetics.
    Feel free to send a correction, either in patch form or just a few lines of code. Thanks

  • alfredmyers
    Options

    Here you go!

Categories

Upcoming Training