summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-02-15Fix typo in error message for -ZHEADmasterMatthias Beyer
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2015-06-25killall: fix alloc on commandCraig Small
The command variable wasn't assigned before it was freed in the loop. This change fixes that.
2015-06-25fuser: rework string comparisonCraig Small
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/
2015-06-03doc: fix typo in kill1ll.1Craig Small
Lev reported that we were saying in the manpage that killall uses expended regular expression and not exTended regular expression.
2015-03-15fuser: -k return status based on any foundCraig Small
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>
2015-03-15Avoid possible crash and memory leak in killallWerner Fink
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>
2015-01-26Fixed typo in fuser.1 Debian #763374Craig Small
2014-12-24Updated translationsCraig Small
Imported the latest po files from the translation project.
2014-12-24killall younger and older flagsCraig Small
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.
2014-12-23Removed early free on name_lenCraig Small
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.
2014-08-25Include <limits.h> for PATH_MAXPaul Barker
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>
2014-06-03Note S patch #34 for pstreeCraig Small
2014-06-03pstree: Ignore processes that disappear before reading cmdlineMartin Schwenke
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>
2014-06-03define PATH_MAX for freebsdCraig Small
2014-05-22Fix some segfaults due to freeing too earlyCraig Small
2014-05-19Fixed v4 versus v6 problemCraig Small
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
2014-05-19Update translationsCraig Small
2014-05-19Minor fixes due to Coverity reportingCraig Small
2014-03-01Merge branch 'master' of ssh://git.code.sf.net/p/psmisc/codeCraig Small
2014-03-01Full thread display for pstree an optionAllan Wirth
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>
2014-03-01Full thread display for pstree an optionAllan Wirth
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>
2014-02-28Typo in fuser makes -M on all the timeBrad Jorsch
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>
2014-02-28Updated po filesCraig Small
Signed-off-by: Craig Small <csmall@enc.com.au>
2014-02-16Last translation update for this versionCraig Small
Updated the ones that came in later. Signed-off-by: Craig Small <csmall@enc.com.au>
2014-02-03Update the translationsCraig Small
Signed-off-by: Craig Small <csmall@enc.com.au>
2014-02-02Another PO file updateCraig Small
Signed-off-by: Craig Small <csmall@enc.com.au>
2014-02-02Update po files from TP siteCraig Small
rsyned the latest po files from TP site, ready for the last update. Signed-off-by: Craig Small <csmall@enc.com.au>
2014-02-02pstree: fclose fopened filesCraig Small
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>
2014-02-01fuser -M and -m flags work either wayCraig Small
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>
2014-01-31Port peekfd to m68kAndreas Schwab
2014-01-31Fixing null pointer dereferenceJaromir Capik
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>
2014-01-31Fixed -p -g typo in psmisc.1Craig Small
The explanation for -g had an errant -p in the description. References: https://sourceforge.net/p/psmisc/bugs/61/
2013-10-09Update for 22.21Craig Small
Updated the translation files Minor fix in killall man page
2013-09-29pstree shows threads correct names.Craig Small
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!
2013-08-11Update of the po/pot filesCraig Small
2013-08-11pstree: introduce namespace transition informationAristeu Rozanski
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>
2013-08-11pstree: introduce support for namespacesAristeu Rozanski
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>
2013-07-16pstree uses COLUMNS environement variableCraig Small
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
2013-04-01Added missing comma from fuser(1)Craig Small
Actuallly it was a missing R because \f, shows nothing but \fR, shows a comma. Bug-Debian: http://bugs.debian.org/702391
2013-02-21ignore tar.gz and config directoryCraig Small
2013-02-21doesn't complain about "not a directory"Han Pingtian
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>
2013-02-21Update po filesCraig Small
2013-02-21use AC_CANONICAL_HOSTMike Frysinger
--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>
2012-10-07pstree compiles with SE LinuxCraig Small
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/
2012-09-20updated with distcheckCraig Small
2012-09-20update translationsCraig Small
2012-09-20freebsd pid 0 and no loopsCraig Small
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>
2012-08-31Updated po filesCraig Small
2012-08-31force process age >= 0Craig Small
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
2012-08-31fuser finds unix socketsCraig Small
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.