1. 23 Jun, 2021 1 commit
  2. 17 Jun, 2021 1 commit
    • jim warner's avatar
      top: refactor 'mkVIZ' support to avoid future problems · dc8137f8
      jim warner authored
      In the patch referenced below, 2 potential abends were
      fixed both of which involved 'alternate display mode'.
      The root cause of those abends was a negative value in
      the 'begnext' field for other than the current window.
      And while that potential is fixed for now the existing
      code almost invites such problems again in the future.
      So, this patch will remove any temptation to name some
      other window in the 'mkVIZrow1' macro. And, since that
      macro is not the only source of 'begnext' changes, the
      'mkVizrowX' is being added to identify such occasions.
      [ and for symmetry i've added a 'mkVIZyes' macro and ]
      [ ameliorated an otherwise surreptitious assignment! ]
      commit 84e85611
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
  3. 16 Jun, 2021 3 commits
  4. 15 Jun, 2021 1 commit
    • Jan Alexander Steffens (heftig)'s avatar
      free: Clean up scale_size and fix `free -h --si` · 91e58792
      Jan Alexander Steffens (heftig) authored
      - Simplify control flow a bit. We don't need two loop variables, either.
      - Consistently use %lld for bytes.
      - Fix the base handling for human-readable output. The code used to
        calculate *mebibytes* first, then scale that to the required exponent
        with the selected base, which is patently wrong.
      Fixes #133
  5. 02 Jun, 2021 3 commits
  6. 29 May, 2021 1 commit
    • Bas van der Vlies's avatar
      sysctl man page update for pattern · 9f0d1c8b
      Bas van der Vlies authored
      pattern must be used before `--system` else it does not work for sysctl
      root# /sbin/sysctl --system --pattern '^net.ipv6'
      * Applying /etc/sysctl.d/30-ceph-osd.conf ...
      fs.aio-max-nr = 1048576
      kernel.pid_max = 4194304
      * Applying /etc/sysctl.d/protect-links.conf ...
      fs.protected_hardlinks = 1
      fs.protected_symlinks = 1
      * Applying /etc/sysctl.d/sara_tweaks.conf ...
      net.ipv6.conf.all.disable_ipv6 = 1
      net.ipv6.conf.lo.disable_ipv6 = 0
      * Applying /etc/sysctl.conf ...
      root# /sbin/sysctl --pattern '^net.ipv6' --system
      * Applying /etc/sysctl.d/30-ceph-osd.conf ...
      * Applying /etc/sysctl.d/protect-links.conf ...
      * Applying /etc/sysctl.d/sara_tweaks.conf ...
      net.ipv6.conf.all.disable_ipv6 = 1
      net.ipv6.conf.lo.disable_ipv6 = 0
      * Applying /etc/sysctl.conf ...
  7. 26 May, 2021 1 commit
    • Henrik Grimler's avatar
      configure: add macro to check for __PROGNAME · 859b63f8
      Henrik Grimler authored
      in include/c.h we check if HAVE___PROGNAME is defined, but the
      corresponding macro for setting (or not setting) it is missing from
      the configure script. This commit adds the missing macro, by
      copying it from the macro in tmux.
  8. 06 May, 2021 1 commit
  9. 24 Apr, 2021 1 commit
  10. 23 Apr, 2021 1 commit
  11. 18 Mar, 2021 1 commit
  12. 15 Feb, 2021 1 commit
  13. 09 Feb, 2021 1 commit
  14. 08 Feb, 2021 2 commits
  15. 29 Jan, 2021 1 commit
  16. 28 Jan, 2021 2 commits
  17. 22 Jan, 2021 2 commits
  18. 21 Jan, 2021 4 commits
  19. 02 Jan, 2021 2 commits
    • jim warner's avatar
      top: tweak cmd/cmdline logic for a possible bad locale · 8ff0dcbd
      jim warner authored
      Since this master library isn't quite as sophisticated
      as the newlib version, this patch will protect against
      the possibility of multibyte characters in a program's
      name combined with some locale without UTF-8 encoding.
      [ it is better to treat the COMMAND column length as ]
      [ more than what's actually printed than to have the ]
      [ line overflow & corrupt the remaining screen lines ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      library: let's make 'escaped_copy' multibyte aware too · 0d386260
      jim warner authored
      This patch is intended to bring the master branch into
      closer alignment with the newlib branch functionality.
      The commit shown below replaced that 'escape_str' with
      'escaped_copy' so that the ps program wouldn't execute
      some code twice. However, it created a problem for the
      top program when the UTF-8 encoding was not available.
      Unlike ps who calls the escape functions directly, top
      outputs those library provided strings unaltered. That
      means there is no workaround (like LANG=) when such an
      encoding was unavailable. This, in turn, can lead to a
      corrupted display (especially with the linux console).
      Now, when a UTF-8 encoding is not available, multibyte
      chars are converted to '?', reducing display problems.
      [ there's still a potential problem concerning 'cmd' ]
      [ should program names contain multibyte characters. ]
      [ unlike that newlib branch, this string is not ever ]
      [ altered with the '?' char under the master branch. ]
      . Dec 2020, escaoed_copy repleced most escape_str
      commit eea5626b
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
  20. 28 Dec, 2020 4 commits
    • jim warner's avatar
      library: help ensure 'escape_str' isn't executed twice · eea5626b
      jim warner authored
      Now that the ps program is using 'escape_str' for most
      of the library's returned strings, this patch tries to
      lessen the prospects of executing that function twice.
      Our newlib branch has achieved such a goal through the
      elimination of nearly all escape.c code. However, here
      we avoid API change by trading some 'escape_str' calls
      (with wide character overhead) for a slightly extended
      'escaped_copy' call (which incurs no multibyte costs).
      Note: until we migrate to the newlib version, there is
      a remaining call to 'escape_str' which we can't avoid.
      Such code involves the 'escape_command' function call.
      [ As we prepare for this new (final?) release, there ]
      [ were already internal library changes that require ]
      [ a new 'revision'. This patch won't impact the API! ]
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      top: added utf8 multibyte support to additional fields · c76144ea
      jim warner authored
      When any process' command line contains multibyte utf8
      characters, two separate display problems could arise.
      1. If that COMMAND column is not displayed as the very
      last field, then field(s) to the right are misaligned.
      2. Even when last, should utf8 string length (not that
      display length) exceed allowable screen width, it will
      nonetheless suffer from improper premature truncation.
      Number 1 is less of a concern since the cmdline column
      is likely to always be the last field to be displayed,
      if only to enable right and left scrolling provisions.
      Number 2 is much more likely to occur, especially with
      additional fields which might be shown before COMMAND.
      Or, forest view child tasks can yield the same effect.
      So, this commit will permit the correct utf8 multibyte
      display regardless of field position or string length.
      And, we'll bring top into line with the ps program for
      additional fields potentially subject to utf8 display.
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
      ps: extend utf8 multibyte support to additional fields · be222912
      jim warner authored
      Form its inception (back in May of 2011), escaped_copy
      has always been a flawed function. It does not operate
      on 'escaped' strings but instead treats all input as a
      regular string incapable of containing utf8 sequences.
      As such, it should only be used for strings guaranteed
      to NOT contain multibyte characters (like supgid). For
      all other strings, which could contain utf8 stuff, the
      correct function should have been that escape_str guy.
      So this commit changes nearly every escaped_copy call.
      [ note: unlike the newlib guy, the master ps program ]
      [ cannot properly handle utf8 multibyte sequences in ]
      [ in the recently introduced 'exe' field shown below ]
      . Jun 2018, introduced 'exe' field
      commit b556bf5b
      . May 2011, original escaped_copy (cmdline, cgroup)
      commit 7b0fc19e
      Signed-off-by: jim warner's avatarJim Warner <james.warner@comcast.net>
    • jim warner's avatar
  21. 22 Dec, 2020 6 commits