]> granicus.if.org Git - psmisc/log
psmisc
3 years agopstree: add apparmor support
Georgia Garcia [Thu, 9 Sep 2021 18:30:40 +0000 (18:30 +0000)]
pstree: add apparmor support

While the current fallback method might obtain the correct AppArmor
context by checking /proc/self/attr/current, it is not guaranteed that
this value will be the context attributed by AppArmor. The current
interface being used upstream is /proc/self/attr/apparmor/current, and
that can be obtained by using the AppArmor library functions.

In order to avoid link time dependencies, we are loading the apparmor
library dynamically, just like is currently done by SELinux.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
3 years agopstree: refactor out selinux specific code
Georgia Garcia [Thu, 9 Sep 2021 18:24:26 +0000 (18:24 +0000)]
pstree: refactor out selinux specific code

The security context code was intermingled with SELinux specific code.
This change refactors it out into its specific function.
There was also some whitespace fixes.

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
3 years agopstree: Fix storage leak
Craig Small [Mon, 18 Oct 2021 07:12:06 +0000 (18:12 +1100)]
pstree: Fix storage leak

@jrybar pointed out pstree had a memory leak. The MR was close but
was 2 lines out from where it should be.

References:
psmisc/psmisc!29

3 years agopstree: Don't stop compact with pgids
Craig Small [Mon, 21 Jun 2021 12:19:44 +0000 (22:19 +1000)]
pstree: Don't stop compact with pgids

Showing pgids used to disable compaction. But, despite the vague
NPTL documentation, its not possible to have different PGID in the
same thread group, so lack of compaction is not required.

With setpgid(), the last thread in the process that calls it
wins. There might be a debate about should this be the right way
but that's a kernel thing.

References:
 #34
 Test program https://gitlab.com/-/snippets/2094161
  https://man7.org/linux/man-pages/man7/nptl.7.html

3 years agopstree: check pid with show parents
Craig Small [Mon, 21 Jun 2021 12:11:36 +0000 (22:11 +1000)]
pstree: check pid with show parents

If the -s option was used then we didn't check the return of
find_proc(). This meant if you used a pid that was for no process
it returned NULL and the whole tree was shown.

pstree checks for find_proc() returning NULL and errors out.

References:
 #38

3 years agoMerge branch 'signames' into 'master'
Craig Small [Tue, 16 Mar 2021 05:57:08 +0000 (05:57 +0000)]
Merge branch 'signames' into 'master'

Use CPPFLAGS when generating signames.h

See merge request psmisc/psmisc!27

3 years agoUse CPPFLAGS when generating signames.h
Cristian Morales Vega [Fri, 12 Mar 2021 10:17:57 +0000 (10:17 +0000)]
Use CPPFLAGS when generating signames.h

It may contain a flag that changes the generated output. For example, it
may make it look at a different signals.h.

3 years agobuild-sys: Don't require po4a for installation v23.4
Craig Small [Fri, 5 Feb 2021 23:58:54 +0000 (10:58 +1100)]
build-sys: Don't require po4a for installation

The build system tested for the presence of po4a binary at the
install step. psmisc ships with translated man pages so doesn't
need po4a for install/uninstallation.

3 years agonls: Update lang files due to previous commit
Craig Small [Fri, 5 Feb 2021 22:03:03 +0000 (09:03 +1100)]
nls: Update lang files due to previous commit

3 years agoMerge branch 'rafaelff/psmisc-doc-fixes'
Craig Small [Fri, 5 Feb 2021 22:00:17 +0000 (09:00 +1100)]
Merge branch 'rafaelff/psmisc-doc-fixes'

References:
 psmisc/psmisc!26

3 years agodoc: Fix minor issues with man pages
Rafael Fontenelle [Thu, 4 Feb 2021 15:16:24 +0000 (12:16 -0300)]
doc: Fix minor issues with man pages

3 years agonls: update translations for last time
Craig Small [Fri, 5 Feb 2021 21:55:33 +0000 (08:55 +1100)]
nls: update translations for last time

3 years agonls: Update translations
Craig Small [Wed, 3 Feb 2021 06:59:51 +0000 (17:59 +1100)]
nls: Update translations

3 years agobuild-sys: Ignore c files in temp directory
Craig Small [Thu, 28 Jan 2021 11:32:41 +0000 (22:32 +1100)]
build-sys: Ignore c files in temp directory

If the build system had a temporary psmisc-* directory
and update-potfiles was run, then the temporary files were included
in the list, causing a lot of problems later.

This update means we will ignore those files.

3 years agonls: Add/update manpage translations
Craig Small [Thu, 28 Jan 2021 11:21:26 +0000 (22:21 +1100)]
nls: Add/update manpage translations

3 years agonls: Get translation project languages updates
Craig Small [Thu, 28 Jan 2021 11:17:21 +0000 (22:17 +1100)]
nls: Get translation project languages updates

3 years agonls: Update translations v23.4rc1
Craig Small [Fri, 22 Jan 2021 06:50:06 +0000 (17:50 +1100)]
nls: Update translations

3 years agobuild-sys: Update the dejagnu stuff
Craig Small [Mon, 11 Jan 2021 10:33:09 +0000 (21:33 +1100)]
build-sys: Update the dejagnu stuff

3 years agokillall: User security attributes and dlsym selinux
Craig Small [Mon, 11 Jan 2021 10:30:31 +0000 (21:30 +1100)]
killall: User security attributes and dlsym selinux

Like what was done for pstree, use the kernel security attributes
when availavble and runttime link to selinux library when required.

3 years agopstree: Dynamically link to SELinux and expand -Z
Craig Small [Tue, 5 Jan 2021 00:40:36 +0000 (11:40 +1100)]
pstree: Dynamically link to SELinux and expand -Z

pstree will dynamically link to libselinux if available.
The -Z flag now looks the same as ps -Z and uses SELinux contexts
if available or whatever is in /proc/PID/attr/current otherwise.

This brings the pstree output the same as ps, in fact I lifted
the code from ps/output.c

3 years agomisc: Update translation templates
Craig Small [Tue, 5 Jan 2021 00:27:36 +0000 (11:27 +1100)]
misc: Update translation templates

4 years agomisc: Add notes for time namespace
Craig Small [Tue, 1 Dec 2020 09:25:22 +0000 (20:25 +1100)]
misc: Add notes for time namespace

Add Changelog entry, man page and help for time namespace.

References:
 commit 64d29380d249a64ca7b995de77f450ac37646ff4
 psmisc/psmisc!25

4 years agoMerge branch 'pstree-add-time-namespace' into 'master'
Craig Small [Tue, 1 Dec 2020 09:17:35 +0000 (09:17 +0000)]
Merge branch 'pstree-add-time-namespace' into 'master'

pstree: add time namespace

See merge request psmisc/psmisc!25

4 years agopstree: add time namespace
Pavel Tikhomirov [Wed, 18 Nov 2020 10:45:50 +0000 (13:45 +0300)]
pstree: add time namespace

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
4 years agomisc: Add changelog entry for previous commit
Craig Small [Tue, 27 Oct 2020 11:19:23 +0000 (22:19 +1100)]
misc: Add changelog entry for previous commit

References:
 psmisc/psmisc!24

Signed-off-by: Craig Small <csmall@dropbear.xyz>
4 years agofix layout with -C
m [Wed, 7 Oct 2020 19:45:39 +0000 (15:45 -0400)]
fix layout with -C

4 years agofuser: Check pathname only on non-block devices
Craig Small [Tue, 27 Oct 2020 10:59:25 +0000 (21:59 +1100)]
fuser: Check pathname only on non-block devices

The referenced commit we would check the pathname to
ensure it matched our target. This worked fine for
real files. However for block devices it would fail
because "/dev/sda1" doesn't match "/mnt/myfile".

We only check the pathname if the thing we are matching
against is not a block file.

Thanks to @MarsChan for the report and also the suggested
fix!

References:
 commit 5c979b38253d187a8ecb8e52a0878b8bb668894f
 psmisc/psmisc#31

Signed-off-by: Craig Small <csmall@dropbear.xyz>
4 years agopofiles update
Craig Small [Wed, 9 Sep 2020 11:03:42 +0000 (21:03 +1000)]
pofiles update

4 years agodoc: Fix minor issues with man pages
Craig Small [Wed, 9 Sep 2020 10:56:14 +0000 (20:56 +1000)]
doc: Fix minor issues with man pages

References:
 pstree/pstree#29

4 years agodocs: Added trial matrix URL
Craig Small [Thu, 23 Jul 2020 10:49:20 +0000 (20:49 +1000)]
docs: Added trial matrix URL

4 years agobuild-sys: Add version file creation
Craig Small [Fri, 22 May 2020 07:05:43 +0000 (17:05 +1000)]
build-sys: Add version file creation

Hopefully stops some of the version UNKNOWN stuff

4 years agofuser: Less confused about duplicate dev_id
Craig Small [Fri, 22 May 2020 06:21:10 +0000 (16:21 +1000)]
fuser: Less confused about duplicate dev_id

NFS mounts from the same server have the same device ID. This means
using the -m option a process using one of those mounts will be
"found" in all of the others too.

lsof doesn't have this confusion as it checks the real path against
the mount point and only matches if they start the same.

I think it would be confused with double stacked NFS shares such
as /nfs/SHARE1/blah/SHARE2 with the open file in SHARE2 but
there are limits.

References:
 psmisc/psmisc#10

4 years agoMerge branch 'jrybar/psmisc-pstree-skip-args-NULs'
Craig Small [Tue, 5 May 2020 03:51:13 +0000 (13:51 +1000)]
Merge branch 'jrybar/psmisc-pstree-skip-args-NULs'

References:
 psmisc/psmisc!22

4 years agopstree: consecutive NULs in cmdline args wrongly parsed
Jan Rybar [Wed, 29 Apr 2020 15:26:51 +0000 (17:26 +0200)]
pstree: consecutive NULs in cmdline args wrongly parsed

4 years agomisc: Update README
Craig Small [Tue, 17 Mar 2020 22:26:31 +0000 (09:26 +1100)]
misc: Update README

Added a bunch of links
Removed gitter

4 years agonls: update langauges and ignore generated manpages
Craig Small [Tue, 10 Mar 2020 19:57:01 +0000 (06:57 +1100)]
nls: update langauges and ignore generated manpages

4 years agopeekfd: exit() after perror()
Craig Small [Mon, 2 Mar 2020 11:27:20 +0000 (22:27 +1100)]
peekfd: exit() after perror()

4 years agofuser: free local port before return
Craig Small [Mon, 2 Mar 2020 11:16:26 +0000 (22:16 +1100)]
fuser: free local port before return

parse_inet allocated a string using strdup() but didn't always
release it.

References:
 Coverity #14401

4 years agopeekfd: Check return value of malloc
Craig Small [Mon, 2 Mar 2020 11:08:27 +0000 (22:08 +1100)]
peekfd: Check return value of malloc

If malloc returned null on lastbuf then we would have had a
derefencing NULL issue.

References:
 Coverity 46258

4 years agopstree: minor snprintf fix
Craig Small [Mon, 2 Mar 2020 11:00:25 +0000 (22:00 +1100)]
pstree: minor snprintf fix

The referenced commit used size_t as a return value for
snprintf.

Coverity found the negative check against size_t but the real
problem was using size_t in the first place as an error
returned by snprintf would never be detected.

References:
 commit 5e510d1c9ed8cb61f9c504076a7c4828624b8b07
 Coverity #288526

4 years agokillall: minor str length changes
Craig Small [Mon, 2 Mar 2020 10:56:02 +0000 (21:56 +1100)]
killall: minor str length changes

reworked some of the string handling to check for strchr and
strrchr return values. Removed check for unsigned to be negative,
that's not going to happen!

References:
 Coverity 288525

4 years agomisc: update date to 2020
Craig Small [Mon, 2 Mar 2020 10:47:21 +0000 (21:47 +1100)]
misc: update date to 2020

4 years agobuild-sys: add missing po4a macro
Craig Small [Mon, 2 Mar 2020 10:12:46 +0000 (21:12 +1100)]
build-sys: add missing po4a macro

4 years agonls: update
Craig Small [Mon, 2 Mar 2020 08:35:48 +0000 (19:35 +1100)]
nls: update

4 years agoFix typo in error message for -Z
Matthias Beyer [Sat, 15 Feb 2020 21:14:10 +0000 (22:14 +0100)]
Fix typo in error message for -Z

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
4 years agodocs: Add translation build system for manpages
Craig Small [Mon, 2 Mar 2020 08:28:28 +0000 (19:28 +1100)]
docs: Add translation build system for manpages

5 years agodocs: Fix unknown macro
Craig Small [Thu, 14 Nov 2019 23:11:57 +0000 (10:11 +1100)]
docs: Fix unknown macro

Remove two unknown macros in manpages

5 years agoMerge branch 'ppraszmo/psmisc-fix-pstree-race'
Craig Small [Thu, 14 Nov 2019 22:53:45 +0000 (09:53 +1100)]
Merge branch 'ppraszmo/psmisc-fix-pstree-race'

References:
 psmisc/psmisc!21

5 years agopstree: additional for do not crash on missing processes
Craig Small [Thu, 14 Nov 2019 22:53:12 +0000 (09:53 +1100)]
pstree: additional for do not crash on missing processes

5 years agopstree: do not crash on missing /proc/xxxx directory
Piotr Praszmo [Wed, 23 Oct 2019 12:11:01 +0000 (14:11 +0200)]
pstree: do not crash on missing /proc/xxxx directory

This can happen when process ends while pstree is running.
Ignore such processes.

5 years agolang: another po update v23.3
Craig Small [Tue, 12 Nov 2019 10:23:38 +0000 (21:23 +1100)]
lang: another po update

5 years agolang: update the po files
Craig Small [Tue, 12 Nov 2019 10:19:30 +0000 (21:19 +1100)]
lang: update the po files

5 years agolang: another update
Craig Small [Thu, 24 Oct 2019 10:13:09 +0000 (21:13 +1100)]
lang: another update

5 years agolang: update language files
Craig Small [Thu, 24 Oct 2019 10:00:27 +0000 (21:00 +1100)]
lang: update language files

5 years agopstree: use out_string instead of printf
Craig Small [Wed, 23 Oct 2019 10:40:49 +0000 (21:40 +1100)]
pstree: use out_string instead of printf

The colour functions used printf but now use the out_string like
the rest of pstree.

5 years agopstree: Add color by age
Craig Small [Wed, 23 Oct 2019 10:34:51 +0000 (21:34 +1100)]
pstree: Add color by age

New -C and --color option sets the process color depending on its age.
Possibly one day a user could set the colors and ages but for now its
hard-coded.

References
  psmisc/psmisc#21

5 years agomisc: change my email address
Craig Small [Tue, 22 Oct 2019 22:49:12 +0000 (09:49 +1100)]
misc: change my email address

5 years agochangelog: fix version
Craig Small [Thu, 12 Sep 2019 10:50:19 +0000 (20:50 +1000)]
changelog: fix version

The changelog had no 23.3 but jumped to 23.4 which wasn't released.
Fixed it back to 23.3

5 years agopstree: make the long version of option -c describe what it does
Benno Schulenberg [Sat, 22 Jun 2019 14:05:30 +0000 (16:05 +0200)]
pstree: make the long version of option -c describe what it does

Having a long option that says the opposite of what it actually does
is awkward.  Choose to just extend its name to --compact-not, so that
scripts that use --compact will continue to work.

5 years agodocs: sort the -g option into its alphabetical position in pstree.1
Benno Schulenberg [Sat, 22 Jun 2019 14:01:57 +0000 (16:01 +0200)]
docs: sort the -g option into its alphabetical position in pstree.1

5 years agodocs: fix a typo in pstree.1
Benno Schulenberg [Sat, 22 Jun 2019 13:59:31 +0000 (15:59 +0200)]
docs: fix a typo in pstree.1

5 years agopstree: alphabetize the -g and -G options correctly in the usage message
Benno Schulenberg [Sat, 22 Jun 2019 13:43:31 +0000 (15:43 +0200)]
pstree: alphabetize the -g and -G options correctly in the usage message

And, as we're changing the usage string anyway, also slice it up into
overseeable chunks (for the translators), and always put the short and
the long option on the same line (as is done for -Z), so it is clearer
that they are the same option.

5 years agopstree: use separate fprintf() calls for compilation alternatives
Benno Schulenberg [Sat, 22 Jun 2019 13:34:35 +0000 (15:34 +0200)]
pstree: use separate fprintf() calls for compilation alternatives

Alternative strings should be self-contained, otherwise xgettext()
will glue the strings together into a msgid that will never occur.

Also, add the missing option -T to the synopsis of the command.

5 years agotranslations: update
Craig Small [Mon, 24 Jun 2019 12:21:06 +0000 (22:21 +1000)]
translations: update

5 years agofuser: use larger inode size
Craig Small [Mon, 24 Jun 2019 12:16:54 +0000 (22:16 +1000)]
fuser: use larger inode size

Scanned inodes now are unsigned long long.
Thanks to... anon!

References:
 psmisc/psmisc#16

5 years agopstree: initialize pid_set
Vladislav Ivanishin [Thu, 6 Jun 2019 16:28:20 +0000 (19:28 +0300)]
pstree: initialize pid_set

5 years agochangelog: put in merge request
Craig Small [Thu, 9 May 2019 11:29:11 +0000 (21:29 +1000)]
changelog: put in merge request

5 years agochangelog: Add note for psmisc/psmisc!19
Craig Small [Thu, 9 May 2019 11:28:34 +0000 (21:28 +1000)]
changelog: Add note for psmisc/psmisc!19

5 years agoThis patch is to 'Add ARM64 support to peekfd'.
akaher [Tue, 16 Apr 2019 13:50:08 +0000 (13:50 +0000)]
This patch is to 'Add ARM64 support to peekfd'.

ARM64 copy user_pt_regs to user space instead of pt_regs.
So in this patch, mapping the require user_pt_regs except orig_x0,
as orig_x0 not available in user_pt_regs for SYSCALL exit.

For each SYSCALL, peekfd catches user_pt_regs for SYSCALL entry/exit.
Value of orig_x0 is available in user_pt_regs->x0 of SYSCALL entry.

So to get orig_x0, stores user_pt_regs of SYSCALL entry,
and then compare 'fd and addr of buffer' of  SYSCALL exit
with SYSCALL entry to retrive orig_x0 at the time of SYSCALL exit.

Signed-off-by: Ajay Kaher <akaher@vmware.com>
5 years agochangelog: Add note for !18
Craig Small [Thu, 9 May 2019 11:22:15 +0000 (21:22 +1000)]
changelog: Add note for !18

5 years agoMerge branch 'jrybar/psmisc-fuser-nullptr-sanity-scan-fns'
Craig Small [Thu, 9 May 2019 11:23:16 +0000 (21:23 +1000)]
Merge branch 'jrybar/psmisc-fuser-nullptr-sanity-scan-fns'

References:
 psmisc/psmisc!18

5 years agoNULLptr sanity added in scan fns to avoid useless prep work (stalls NFS)
Jan Rybar [Tue, 19 Feb 2019 15:39:17 +0000 (16:39 +0100)]
NULLptr sanity added in scan fns to avoid useless prep work (stalls NFS)

6 years agoMerge branch 'stapelberg/psmisc-dirstamp'
Craig Small [Wed, 7 Nov 2018 09:23:15 +0000 (20:23 +1100)]
Merge branch 'stapelberg/psmisc-dirstamp'

References:
 psmisc/psmisc!17

6 years agoMakefile.am: create src/ before src/signames.h
Michael Stapelberg [Sun, 14 Oct 2018 14:07:23 +0000 (16:07 +0200)]
Makefile.am: create src/ before src/signames.h

This fixes out-of-tree builds which use
--disable-dependency-tracking. With dependency tracking enabled,
src/.deps is created as a side-effect of how dependency tracking
works, which is why this issue was never noticed before.

6 years agomisc: Remember to add comm.h too
Craig Small [Wed, 7 Nov 2018 09:19:38 +0000 (20:19 +1100)]
misc: Remember to add comm.h too

The previous commit should have included comm.h too

6 years agokillall: match on 16 character commlen too
Craig Small [Wed, 7 Nov 2018 09:13:09 +0000 (20:13 +1100)]
killall: match on 16 character commlen too

The comm length increase meant killall could accomodate the
larger comm name given out by newer kernels but it meant that
if a user relied on the previous 16 character truncation then
processes that used to match would fail.

killall now checks to see if the the comm is the old COMM_LEN
length and the given name is longer than old COMM_LEN and does
a truncated match as well.

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

6 years agomisc: translations update v23.2
Craig Small [Mon, 24 Sep 2018 10:04:19 +0000 (20:04 +1000)]
misc: translations update

6 years agokillall: Another go at option parsing
Craig Small [Tue, 18 Sep 2018 11:17:00 +0000 (21:17 +1000)]
killall: Another go at option parsing

This now seems to be working. There are some evil hacks, especially for
the -ve option combination but it seems that we have a winner.

Added a bunch more option parsing tests which picked up -ILL passed but
-VTALRM did not. Not sure why, but length seems my guess

References:
 psmisc/psmisc#13
 psmisc/psmisc#12

6 years agodocs: fix groff errors in fuser.1
Craig Small [Wed, 12 Sep 2018 12:14:41 +0000 (22:14 +1000)]
docs: fix groff errors in fuser.1

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

6 years agomisc: Update translation files
Craig Small [Wed, 12 Sep 2018 12:10:19 +0000 (22:10 +1000)]
misc: Update translation files

6 years agokillall: ignore -n 0
Craig Small [Mon, 10 Sep 2018 12:41:45 +0000 (22:41 +1000)]
killall: ignore -n 0

While all namespaces are used by default, this means if someone used the
temporary -n 0 option in killall they will now get an error.

We just silently ignore it

References:
 commit 38829585c4f5b67c8c2a8cbdf86761a72ace43f6
 psmisc/psmisc#15

6 years agokillall: use correct size for comm
Craig Small [Mon, 27 Aug 2018 11:30:33 +0000 (21:30 +1000)]
killall: use correct size for comm

sizeof only works on statically created pointers, not pointers that are
passed as parameters to the function.

The referenced commit unfortunately didn't follow this and we got
truncated names. Thanks to Hector Martin for pointing the problem out.

References:
 commit 1e2f38a202798a78554ae5f5d12f697f3607f89f
 psmisc/psmisc#14

6 years agolanguage updates
Craig Small [Mon, 13 Aug 2018 11:29:01 +0000 (21:29 +1000)]
language updates

6 years agomisc: Update changelog for previous
Craig Small [Mon, 13 Aug 2018 11:26:18 +0000 (21:26 +1000)]
misc: Update changelog for previous

6 years agoMerge branch 'whydoubt/psmisc-peekfd_tgid'
Craig Small [Mon, 13 Aug 2018 11:24:56 +0000 (21:24 +1000)]
Merge branch 'whydoubt/psmisc-peekfd_tgid'

Merges psmisc/psmisc!15

6 years agopeekfd: Allow attaching to all threads in group
Jeff Smith [Tue, 3 Oct 2017 03:25:57 +0000 (22:25 -0500)]
peekfd: Allow attaching to all threads in group

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
6 years agopeekfd: split follow_forks into follow_clones
Jeff Smith [Sat, 23 Sep 2017 06:12:44 +0000 (01:12 -0500)]
peekfd: split follow_forks into follow_clones

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
6 years agopslog: Define PATH_MAX if required
Craig Small [Mon, 13 Aug 2018 11:19:39 +0000 (21:19 +1000)]
pslog: Define PATH_MAX if required

Hurd doesn't define PATH_MAX so we either change things to not use it
or conditionally define it.

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

6 years agofuser: path fixes and command name length
Craig Small [Sun, 20 May 2018 11:41:20 +0000 (21:41 +1000)]
fuser: path fixes and command name length

Change some of the paths to use dynamically allocated memory, so no
limit, or use the PATH_MAX macro.

Command Name increases to 64 and try to use the COMM_LEN or the size
of the holding buffer consistently.

6 years agobuildsys: signals.c depends on signames.h
Cristian Morales Vega [Sun, 20 May 2018 11:11:55 +0000 (21:11 +1000)]
buildsys: signals.c depends on signames.h

By explicitly specifying the dependency between signals.c and
signames.h.

BUILT_SOURCES only works with the standard targets, so if somebody tries
to build fuser directly he may end up with a build failure. What's
worse, he could do "make -j2 src/signames.h src/fuser" and he could end
up with a broken build using a only partially generated signames.h.

And that "somebody" was me when packaging killall in psmisc 22.21...
so it actually happens.

References:
 psmisc/psmisc!16

6 years agokillall: increase comm len to 64, fix indenting
Craig Small [Sun, 20 May 2018 11:02:47 +0000 (21:02 +1000)]
killall: increase comm len to 64, fix indenting

command name length now 64
fixed the indenting at last

6 years agokillall: change to getopt_long
Craig Small [Sun, 20 May 2018 10:46:55 +0000 (20:46 +1000)]
killall: change to getopt_long

with getopt_long_only -ve fails because its not sure what the -v
is for --version or --verbose. Changing to the non-_only version means
it doesn't try to expand the options to long options.

References:
 psmisc/psmisc#12

6 years agokillall: Fix -INT option parsing
Craig Small [Sun, 20 May 2018 10:42:12 +0000 (20:42 +1000)]
killall: Fix -INT option parsing

Sometimes killall gets confused between a signal name and a set of
options. This small patch should un-confuse it.

6 years agoMerge branch 'brenoleitao/psmisc-master'
Craig Small [Sat, 5 May 2018 22:11:40 +0000 (08:11 +1000)]
Merge branch 'brenoleitao/psmisc-master'

Merge request psmisc/psmisc!12

6 years agopstree: Linking with libintl.
Breno Leitao [Thu, 6 Apr 2017 17:03:00 +0000 (14:03 -0300)]
pstree: Linking with libintl.

Curently pstree does built, at least on ppc64le, because it does
not have a explicit link against gettext, causing the following error:

  peekfd.o: In function `print_version':
  peekfd.c:(.text+0x160): undefined reference to `libintl_gettext'
  peekfd.c:(.text+0x18c): undefined reference to `libintl_gettext'
  peekfd.c:(.text+0x1ac): undefined reference to `libintl_gettext'

peekfd depends on libint because of the following macro:

  #define _(String) gettext (String)

6 years agopeekfd: Include headers for ppc64
Breno Leitao [Thu, 6 Apr 2017 16:59:57 +0000 (13:59 -0300)]
peekfd: Include headers for ppc64

Currently peekfd fails to build on ppc64le architecture with musl
because it does not find reference for __WORDSIZE.

This patch just includes reference for this macro if it was not
previously defined.

6 years agoMerge branch 'baruchsi/psmisc-ship-git-version-gen'
Craig Small [Sat, 5 May 2018 22:05:44 +0000 (08:05 +1000)]
Merge branch 'baruchsi/psmisc-ship-git-version-gen'

Merging psmisc/psmisc!13

6 years agoMakefile: ship also git-version-gen
Baruch Siach [Thu, 22 Jun 2017 12:04:40 +0000 (15:04 +0300)]
Makefile: ship also git-version-gen

Without git-version-gen, the tarball autogen.sh fails.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
6 years agokillall: use all namespaces by default
Craig Small [Sat, 5 May 2018 22:02:35 +0000 (08:02 +1000)]
killall: use all namespaces by default

This is similar to the revert in procps where namespace filtering
is added but by default it uses all of them. The issue is most people
expect to see/kill all processes and the namespace filtering causes
confusion, especially around ssh related processes.

7 years agolanguage file updates
Craig Small [Sun, 9 Jul 2017 12:12:51 +0000 (22:12 +1000)]
language file updates