Skip to content
Snippets Groups Projects

top -d now accepts non-local delay values

Closed Jan Rybar requested to merge jrybar/procps:top_nonlocal_delay into master

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
    • Jan Rybar @jrybar commented on commit 42cb305e
      Author Owner

      If locale set with ',' as delimiter, scripts using '.' stop working. (eg. LANG=ru_RU.UTF-8)

      Not even mentioning it is confusing. 'watch' and 'free' already support this (commit procps-ng/procps@1310a768)
      It makes sense for 'top' to accept both independently on system locale setting.
      Patch applicable also to newlib.

  • Hi Jan,

    I've tried hard to ensure that top always honours the current LC_NUMERIC setting, even when the locale is changed between top invocations.

    In my opinion, this problem is caused by a faulty script. Either it should have exported the proper locale or relied on a saved rcfile for the delay interval. Alternately, a simple wrapper script exporting an appropriate LC_NUMERIC would also have solved the problem.

    Even so, I've decided to yield on this point and bring top into line with the watch and free programs.

    I'll send a new patch to our mailing list that satisfies this "need". It will also address the following flaws in your solution:

    1. whitespace will be consistently used within each line
    2. existing indentation conventions will be followed
    3. new bugs allowing bad integers will be eliminated affecting
    • 2 command line arguments (-n, -w)
    • 6 interactive commands (3, n, k, r, X, Y)
    1. potentially echoed user input must never be altered
    2. the 'const char *' broken covenant will be restored

    That's quite a list, Jan, considering so few lines of code.

    Regards,

    Jim

  • closed

  • Jan Rybar mentioned in commit d9c4b6b0

    mentioned in commit d9c4b6b0

  • Jan Rybar mentioned in commit 62da5ee3

    mentioned in commit 62da5ee3

Please register or sign in to reply
Loading