Commit Graph

299 Commits

Author SHA1 Message Date
Craig Small
0ffb087214 misc: Update NEWS to next version 2021-01-22 18:21:08 +11:00
Craig Small
c64584a7b1 misc: Add NEWS for ps sorting 2020-12-22 16:26:35 +11:00
Craig Small
3dcaf97773 ps: Add NEWS and test for exe output
Only need this for master, as Jim took care of exe
handling for newlib in the ad4269 change.

References:
 commit b556bf5ba8
 commit ad4269f118
2020-12-22 15:31:39 +11:00
Craig Small
c2e69b34a7 NEWS: Add notice for pidof -q 2020-12-22 14:32:03 +11:00
Craig Small
5c55464aab Merge branch 'nipunn1313/procps-watch_colors2'
References:
 procps-ng/procps!109
2020-12-22 13:54:50 +11:00
Craig Small
980983db74 Merge branch 'alxu/procps-pwait'
New command, pwait! Waits for another process to finish just like
pgrep finds or pkill kills another process.

References:
 procps-ng/procps!97

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2020-12-22 12:16:09 +11:00
Craig Small
fc93e2919d misc: Document sysctl change bug
While sysctl did change the order of /run and /etc to match
systemd in the referenced commit, the Debian bug report that
brought it to light was not documented.

References:
 commit 24a1574f0a
 https://bugs.debian.org/950788
2020-12-22 10:55:18 +11:00
Craig Small
cb13448179 free,slabtop,uptime: complain about extra ops
free, slabtop and uptime would happily take extra command line
arguments and doing nothing about them. The programs now check
optind after option processing and will give you usage screen
if there is anything extra.

References:
 procps-ng/procps#181
2020-10-19 22:36:06 +11:00
Craig Small
d748966e39 watch: Add no linewrap option
For long lines from a process, watch would wrap them around to the
next. While this default option has it uses, sometimes you want to
just cut those long lines down.

watch has a -w flag which will truncate the lines to the number
of columns. A few simple lines to do this new trick.

I think I caught all the ANSI state correctly but there might be
a chance it bleeds to the next row.

References:
 procps-ng/procps#182
2020-10-19 22:03:44 +11:00
Craig Small
3e1c00d051 ps: Match on truncated 16 char for -C
The referenced commit the comm length was increased from 16 to 64
characters to handle the larger command names for things like kernel
threads.

However most user processes are limited to 15 characters which means
if you try something like ps -C myprogramisbiggerthansixteen this would
fail to match because /proc/<PID>/comm would only be myprogramisbigg

ps now checks the comm length and if it is 15 and if the given match
is 15 or more, it will only match the first 15 characters.

This is also how killall has worked for about a year.

Thanks to Jean Delvare <jdelvare@suse.de> for the note.

References:
 commit 14005a371e
 commit psmisc/psmisc@1188315cd0

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2020-09-24 22:01:22 +10:00
Jim Warner
f57a0301e3 top: fix potential SEGV when no tasks were displayable
This patch fixes a nearly decade old bug discovered by
Frederik Deweerdt. His merge request shown below would
be an adequate solution except for iterative overhead.

This alternate patch will represent substantially less
overhead for an admittedly extremely rare possibility.

Reference(s):
https://gitlab.com/procps-ng/procps/-/merge_requests/114

And-thanks-to: Frederik Deweerdt <fdeweerdt@fastly.com>
Signed-off-by: Jim Warner <james.warner@comcast.net>
2020-09-13 10:28:50 +10:00
Jim Warner
8ebdaf8bcf NEWS: updated for those recent utf-8 translation fixes
Signed-off-by: Jim Warner <james.warner@comcast.net>
2020-06-29 21:12:02 +10:00
Jim Warner
ae4ad637af NEWS: acknowledge those two new top command provisions
Signed-off-by: Jim Warner <james.warner@comcast.net>
2020-05-28 19:37:58 +10:00
Craig Small
77b60ae15e NEWS: add pgrep older than item 2020-05-17 22:00:51 +10:00
Craig Small
d3e0ff5a0a Merge branch 'awesomeclaw/procps-master'
References:
 procps-ng/procps!62

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2020-05-12 19:22:48 +10:00
Craig Small
a68d628adf vmstat: Add NEWS and revert comment from prev
Reverted the translation hint as the fields are used for both
normal and wide modes, so need to fit the smaller of the two.

Added NEWS item

References:
 commit 01c1b2345e
2020-05-12 18:57:26 +10:00
Arun Chandrasekaran
7d55409b82 pgrep: use sigqueue to pass value with the signal.
Based on the command line option, use 'sigqueue'
instead of 'kill' to pass the integer value with
the signal.

References:
 procps-ng/procps!32

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2020-04-25 13:15:06 +10:00
Craig Small
5335851452 kill: Adjust documentation for sigqueue
Added NEWS item
Changed the section for sigqueue as its 3 for me.
2020-04-24 19:29:34 +10:00
Craig Small
95c1fbec86 NEWS: Add item for previous entry
Added NEWS item for pidof show worker threads patch

References:
 commit 9c3296bae9
2020-04-10 14:47:32 +10:00
Jim Warner
9275b381d7 NEWS: fix top alpha order, add 'e' command line switch
Signed-off-by: Jim Warner <james.warner@comcast.net>
2020-04-10 14:35:17 +10:00
Craig Small
4c23fcfd3c docs: Mention stime in ps.1
References:
 procps-ng/procps#164
2020-04-07 19:35:27 +10:00
Craig Small
0afe595a44 NEWS: Fix location of sysctl update
The previous commit put the sysctl directory order entries in
the wrong place.
2020-02-27 22:03:12 +11:00
Craig Small
24a1574f0a sysctl: config directory order
Matches the systemd directory order (/run is after /etc) and
document what directories are used better.
2020-02-27 21:58:07 +11:00
Jim Warner
5cd29e5093 top: restore configuration file backward compatibility
The Debian bug referenced below has nothing to do with
locales. In fact, top was made locale independent back
in release 3.3.13 (April, 2018). However, that bug did
reveal some misplaced logic which this patch corrects.

Prompted by the Qualys audit, all rcfile field strings
were checked for potential duplicates which could only
have resulted from some user's manual/malicious edits.

Unfortunately, that code was executed before top had a
chance to enforce the proper/maximum string length (in
the event an extremely old rcfile had just been read).
This created some potential string overrun references.

In top's original 3.3.15 implementation, the potential
overrun extended for 15 characters. That is the number
of field characters added with 3.3.9 (December, 2013).
But, since strchr() was used, no error exit was taken.

In the revised 3.3.16 implementation, the strchr() was
replaced with '&w->rc.fieldscur[n]'. This held overrun
to a single position while producing an error message.

So, this commit just moves that logic to a point where
fieldscur is guaranteed to be longer than EU_MAXPFLGS.

Reference(s):
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=951335
. revised 3.3.16 validation logic
commit 291d98ee50
. original 3.3.15 validation logic
commit fdb58974e2

Signed-off-by: Jim Warner <james.warner@comcast.net>
2020-02-18 11:20:58 +11:00
Craig Small
6164fbb829 NEWS: Add missing pgrep note 2020-02-06 22:09:56 +11:00
Craig Small
59c88e18f2 v3.3.16 release 2019-12-08 15:06:03 +11:00
Craig Small
d063bfc59e library: Adjust version for release
Previous release incremented the age instead of incrementing the
revision. The age can only increment if revision (internal changes
only) or current (API changes) also increments.

A C:R:A of 8.0.2 means its the latest revision of 8.0 library and
any binary linked against 8.0 will work. This is our third revision
of the 8.0 library.

References:
 https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
2019-12-08 14:56:53 +11:00
Craig Small
e79095ddcc build-sys: Install translated manpages
References:
 procps-ng/procps#146
2019-10-31 20:48:15 +11:00
Craig Small
a2b7106793 snice: Fix matching on PID
@MarsChan correctly pointed out that the read() always returns 128
bytes, so skipping on >= 128 will always mean we skip. Their suggestion
was to remove the equality, but read will never go past 128 bytes so
I just removed that part of the check.

References:
 procps-ng/procps!89
2019-10-22 08:14:35 +11:00
Jim Warner
4c4d8b2464 NEWS: add a new item (top), fix one other item (pgrep)
Signed-off-by: Jim Warner <james.warner@comcast.net>
2019-08-25 10:35:50 +10:00
Jim Warner
e7aa90a866 top: attempt to provide missing xterm vim keys support
A recent issue (and merge request) reminded me of gaps
in top's alternate 'vim' navigation keys support. Some
xterm emulators do not pass the customary strings when
keys were used with the <Ctrl> and/or <Alt> modifiers.

While it was a known problem, this issue/merge request
prompted research into the root cause. As it turns out
the problem is traceable to an X resource known by the
name 'eightBitInput'. When 'true' (the default), a key
pressed in combination with <Alt> will not be preceded
by the <Esc> character. Rather, a single character was
presented (modified via an 'eightBitMeta' X resource).

The following approaches would eliminate this problem:

. start xterm thus: xterm -xrm '*eightBitInput: false'

. use: ~/.Xresources with 'Xterm*eightBitInput: false'

. build xterm with 'configure --enable-meta-sends-esc'
( apparently used for CentOS, Fedora, openSUSE, etc. )

. enable xterm's menu via 'configure --enable-toolbar'
( so the user can set the 'Meta Sends Escape' option )

Of course, none of the above steps is desirable from a
user's perspective. So, this patch will add additional
entries to the iokey function's tinfo_tab to represent
strings passed when the <Alt> key does not send <Esc>.

[ hopefully they'll be the same across all platforms ]

Lastly, this patch will also eliminate those redundant
<Atl> + '\', '/', '<' & '>' provisions, which now seem
like overkill and suffer from that same 'eightBitMeta'
xterm problem. And we might as well say goodbye to the
4 '<Alt> + arrow key' table entries (which do not seem
to currently work with any emulator which I can find).

[ what in the world was I thinking way back in 2011? ]

Reference(s):
. issue
https://gitlab.com/procps-ng/procps/issues/135
. merge request
https://gitlab.com/procps-ng/procps/merge_requests/84

Signed-off-by: Jim Warner <james.warner@comcast.net>
2019-07-04 20:42:27 +10:00
Craig Small
2fa3bb0669 misc: update for pgrep runstate
Added some minor fixes and notes
2019-03-05 07:59:48 +11:00
Craig Small
bb272580a6 docs: Update ps.1 to warn about command name length
Previous versions of ps used to only match on the first 15 characters
because that's what the kernel used to provide. Newer kernels have a
longer length for this field so procps has been updated to suit.

References:
 procps-ng/procps#101
 https://bugzilla.suse.com/show_bug.cgi?id=1099091
2018-08-08 20:13:58 +10:00
Jim Warner
38a668909f top: parent total cpu includes collapsed children, doc
Signed-off-by: Jim Warner <james.warner@comcast.net>
2018-07-17 21:00:51 +10:00
Jim Warner
3943b185a9 top: allow collapsible forest view children, documents
Signed-off-by: Jim Warner <james.warner@comcast.net>
2018-06-23 22:03:57 +10:00
Jim Warner
06d4d985a6 top: 'other filters' saved with config file, documents
Signed-off-by: Jim Warner <james.warner@comcast.net>
2018-06-23 22:03:56 +10:00
Jim Warner
cf057d2fe5 top: provide the means to exploit a 256-color terminal
With the Qualys security audit, we began to harden our
treatment of the top rcfile. In particular, the values
read were checked so as to prevent some malicious user
from editing it in order to achieve an evil objective.

However when it came to colors I was surprised to find
that at least one user edited the rcfile for 256-color
support. Unfortunately, our new checks prevented this.

So this commit will provide the means to exploit those
extra colors with no need to manually edit the rcfile.

Reference(s):
https://gitlab.com/procps-ng/procps/issues/96

Signed-off-by: Jim Warner <james.warner@comcast.net>
2018-06-07 21:35:59 +10:00
Craig Small
c51b329a32 docs: use correct units in free.1
The free manpage used the correct unit names (e.g. membibyte) but the
incorrect unit (e.g. M ) for the human-readable option.

References:
 https://bugs.debian.org/898774

Signed-off-by: Craig Small <csmall@enc.com.au>
2018-05-31 20:34:13 +10:00
Craig Small
59c5133ff1 misc: Reorder NEWS 2018-05-20 07:34:17 +10:00
Craig Small
14005a371e ps: Increase command selection field to 64
The library now presents command names up to 64 characters, in line with
the kernel changes.  ps command name selection (the -C option) now also
is 64 characters long.

References:
 commit 2cfdbbe897
2018-05-19 22:10:11 +10:00
Craig Small
c32ab58b94 pgrep: Remove >15 warning
As comm length can be longer than 15 characters with newer kernels, it
doesn't make sense to have a warning when you make the match string
longer than this.

As a side-effect, it removes the false-positive you got when you used
long regex matches (see issue #92 )

References:
 commit 2cfdbbe897
 procps-ng/procps#92
2018-05-19 08:14:06 +10:00
Craig Small
52dc8dcdea misc: Update NEWS with CVE and library changes 2018-05-19 08:11:23 +10:00
Craig Small
75bd099420 library: check not undef SIGLOST
sig.c had this odd logic where on non-Hurd systems it would undefine
SIGLOST. Fine for Hurd or amd64 Linux systems. Bad for a sparc which
has SIGLOST defined *and* is not Hurd.

Just check its defined, its much simpler.
2018-05-03 21:06:05 +10:00
Craig Small
5576c8e438 library: build on non-glibc systems
Some non-glibc systems didn't have libio.h or __BEGIN_DECLS
Changes to make it more standard.

References:
 issue #88
2018-04-10 21:28:11 +10:00
Craig Small
58bff862fc free: fix scaling on 32-bit systems
Systems that have a 32-bit long would give incorrect results in free.

References:
 Issue #89
 https://www.freelists.org/post/procps/frees-scale-size-broken-with-32bit-long
2018-04-10 21:20:25 +10:00
Craig Small
1982a79ba8 misc: Update news about #91 2018-04-10 21:16:10 +10:00
Craig Small
0b488c7f5c pgrep: Don't segfault with no match
If pgrep is run with a non-program name match and there are
no matches, it segfaults.

The testsuite thinks zero bytes sent, and zero bytes sent
because the program crashed is the same :/

References:
 commit 1aacf4af7f
 https://bugs.debian.org/894917

Signed-off-by: Craig Small <csmall@enc.com.au>
2018-04-06 23:00:29 +10:00
Craig Small
e22a5087dd 3.3.13 release candidate 1
Update NEWS with the version
Add library API change into NEWS
Update c:r:a for library to 7:0:1

This means the current and age are incremented, so old programs can
use new library but not vice-versa as they won't have the numa*
functions.
2018-03-12 16:30:58 +11:00
Craig Small
8954e4349c misc: update NEWS with some missed items 2018-03-03 18:59:17 +11:00
Craig Small
5d0b094b8c ps: Add NEWS and checks for times and cputimes
The previous commit had one minor bug in it because the fields need
to be alphabetical and times comes after timeout.

Added NEWS item for this feature
Added another testsuite check for new flags in case they
disappear or go strange one day.

References:
 commit 8a94ed6111
2018-03-02 22:07:46 +11:00