Age | Commit message (Collapse) | Author |
|
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
|
|
The command variable wasn't assigned before it was freed in the
loop. This change fixes that.
|
|
This one is a patch that reworks the string comparision for file name
space in fuser. It makes the usage of this configurable with
--enable-mountinfo-list at build time as well as at runtime with
--inode. Also it uses shared memory maps to reduce the load on
write/read the stat buffers.
References:
https://sourceforge.net/p/psmisc/patches/36/
|
|
Lev reported that we were saying in the manpage that killall uses
expended regular expression and not exTended regular expression.
|
|
In [bugs:#66] the ever-helpful "Anonymous" reported that
fuser with -k would only return correctly if the process
was found last and not if it was found anywhere.
While I have solved this problem a different way, the report
was enough to narrow down what was going wrong. Now fuser -k
returns 1 if it finds any process to kill, not just if the last
one was; just like fuser with no -k works.
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
By reading the current HEAD I stumbled on a memory leak in killall.c
as well as a not assigned pointer got_long in load_proc_cmdline()
which may lead to SIGSEGV.
References: [patches:#67] https://sourceforge.net/p/psmisc/bugs/67
Signed-off-by: Werner Fink <werner@suse.de>
|
|
|
|
Imported the latest po files from the translation
project.
|
|
The -y and -o flags were not being used if you used the
regex (-r) flag. I initially moved those flags to the
right part of the loop.
However looking at that giant loop of code it was very difficult
to debug so I have also taken the opportunity to re-work it
with some functions, so its clearer what is going on.
|
|
name_len was being freed too early and in a loop so
sometimes you would hit a double-free problem
The locale changes were to keep efence happy though
i suspect something strange was going on with locales there
too.
|
|
When building against musl libc, PATH_MAX is defined in <limits.h>.
Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
|
|
The worst case here is that the user has specific a PID on the
command-line, read_proc() fails to read cmdline for an irrelevant,
transient process and fails.
It is better to simply ignore processes that have disappeared. That
way pstree can provide useful output in more cases.
An alternative is to read cmdline only for processes that the user is
interested in. However, this probably increases the chances of an
interesting process exiting before the cmdline is read.
Signed-off-by: Martin Schwenke <martin@meltin.net>
|
|
|
|
|
|
fuser -n tcp 80 always worked because the v4 or v6 problem didnt hit
single ports, but any ipv4 or ipv6 remote address wouldn't work.
Caught by Coverity CID46269
|
|
|
|
|
|
|
|
Commit [9de89a] made pstree show the correct thread names. This had
the unintended consequence of making a lot of thread views
uncompact, as the names would be different.
Allan suggested that if you want to see the real thread names, then
explictly ask for them. I agree and pstree now has a new option -t
for showing thread names.
$ pstree 22603
udisksd───4*[{udisksd}]
$ pstree -t 22603
udisksd─┬─{cleanup}
├─{gdbus}
├─{gmain}
└─{probing-thread}
References: [patches:#33] https://sourceforge.net/p/psmisc/patches/33/
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Commit [9de89a] made pstree show the correct thread names. This had
the unintended consequence of making a lot of thread views
uncompact, as the names would be different.
Allan suggested that if you want to see the real thread names, then
explictly ask for them. I agree and pstree now has a new option -t
for showing thread names.
$ pstree 22603
udisksd───4*[{udisksd}]
$ pstree -t 22603
udisksd─┬─{cleanup}
├─{gdbus}
├─{gmain}
└─{probing-thread}
References: [#33] https://sourceforge.net/p/psmisc/patches/33/
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Brad found that fuser had the -M option on all the time.
A simple but significant typo caused this, thanks the the patch.
Bug-Debian: http://bugs.debian.org/740275
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Updated the ones that came in later.
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
rsyned the latest po files from TP site, ready for the last update.
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Commit [9de89a] uses fopen to find the tasks, but doesn't fclose
them afterward. Thanks for the anonymous and somewhat obscure
bug commenter for pointing it out.
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Previously fuser -M -m /dir worked while fuser -m /dir -M would
not limit the search. This change means either way will work.
References: http://bugs.debian.org/606178
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
|
|
Introduced with the namespaces support
References:
https://sourceforge.net/p/psmisc/patches/32/
https://sourceforge.net/p/psmisc/code/ci/e64b282643afecb7060c321f8401872feaf07dbb/log/?path=
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
The explanation for -g had an errant -p in the description.
References: https://sourceforge.net/p/psmisc/bugs/61/
|
|
Updated the translation files
Minor fix in killall man page
|
|
pstree would only show the process name, not the thread name. This
change now makes pstree read /proc/<PID>/task/<TID>/stat to find the
threads' real names.
$ pstree -p 1187
udisksd(1187)─┬─{udisksd}(1189)
├─{udisksd}(1191)
├─{udisksd}(1192)
├─{udisksd}(1195)
└─{udisksd}(27395)
./pstree -p 1187
udisksd(1187)─┬─{cleanup}(1195)
├─{gdbus}(1191)
├─{gmain}(1189)
├─{pool}(27395)
└─{probing-thread}(1192)
References:
https://sourceforge.net/p/psmisc/bugs/57/
This fix was made a lot easier due to Mapk providing a small test script
showing the broken behaviour, thanks!
|
|
|
|
This patch adds a new option (-S, --ns-change) that will show
when a namespace was changed compared to parent's.
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
Options -N and --ns-sort were added which require one of the namespaces:
ipc, mnt, net, pid, user, uts
and will show separated trees per namespace
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
pstree previously only used the window size for determining number of
columns, then a default of 132. With this change, pstree now checks
the COLUMNS environment variable first and uses that if valid.
env checking code nicked from top.c, by Jim Warner.
Bug-Debian: http://bugs.debian.org/717017
|
|
Actuallly it was a missing R because \f, shows nothing but \fR, shows a
comma.
Bug-Debian: http://bugs.debian.org/702391
|
|
|
|
If /proc/#/fd points to a path which has component removed, fuser
will complain like "Cannot stat file /proc/29322/fd/16: Not a
directory". Looks like it can be disabled just like commit 898dc70a1f
did.
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
|
|
--host is used for the system where the compiled code will run.
--target is not the correct system to look that up.
http://www.gnu.org/software/autoconf/manual/html_node/Manual-Configuration.html#Manual-Configuration
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
pstree failed to compile with SE Linux enabled because one of the
scontext was missed and without it enabled the bug doesn't appear.
pstree is now re-worked so scontext is defined as a dummy meaning
most of the code except the reall SE Linux specific stuff is compilied
meaning this sort of thing shouldn't happen too much again.
Bug-Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=437332
Bug-Sourceforge: https://sourceforge.net/p/psmisc/bugs/54/
|
|
|
|
|
|
pstree looped forever and never showed anything below pid 1
this change fixes the head of the tree to make sure it has a null
pointer for a parent
Signed-off-by: Craig Small <csmall@enc.com.au>
|
|
|
|
sometimes some small numbers would hit an assert around process age,
this fix just makes really young processes have an age of 0
Bug-Debian: http://bugs.debian.org/628617
|
|
in check_dir() stat was replaced with device() which found the right
device but zeroed out the inode, making that check always fail. This
meant fuser never found unix sockets.
|