]> granicus.if.org Git - psmisc/log
psmisc
7 years agokillall: free regular expression list entries
Jeff Smith [Mon, 20 Mar 2017 19:24:40 +0000 (14:24 -0500)]
killall: free regular expression list entries

Noticed when running tool in valgrind

7 years agokillall: free command buffers appropriately
Jeff Smith [Mon, 20 Mar 2017 18:32:32 +0000 (13:32 -0500)]
killall: free command buffers appropriately

Noticed when running tool in valgrind

7 years agofuser: free various linked lists
Jeff Smith [Thu, 16 Mar 2017 20:11:20 +0000 (15:11 -0500)]
fuser: free various linked lists

Noticed when running tool in valgrind

8 years agonls: update po files ready for distribution
Craig Small [Sat, 3 Dec 2016 09:33:08 +0000 (20:33 +1100)]
nls: update po files ready for distribution

8 years agopstree: some minor code cleanups
Craig Small [Fri, 2 Dec 2016 11:05:01 +0000 (22:05 +1100)]
pstree: some minor code cleanups

8 years agoAvoid possible crash and memory leak in killall
Radu Rendec [Thu, 30 Jun 2016 16:15:21 +0000 (18:15 +0200)]
Avoid possible crash and memory leak in killall

In the case of a command line match, load_proc_cmdline would return a
pointer that was not obtained from malloc, which then would be freed in
kill_all. This behavior could result in a SIGSEGV.

In the case of an empty command line, load_proc_cmdline would return -1,
causing its internal buffer to be leaked in kill_all.

Signed-off-by: Radu Rendec <radu.rendec@mindbit.ro>
Signed-off-by: Craig Small <csmall@enc.com.au>
8 years agoAdd some Debian references to changelog
Craig Small [Fri, 2 Dec 2016 10:46:08 +0000 (21:46 +1100)]
Add some Debian references to changelog

8 years agoMerge branch 'master' into 'master'
Craig Small [Wed, 21 Sep 2016 11:18:21 +0000 (11:18 +0000)]
Merge branch 'master' into 'master'

Updating manpage info about fuser not seeing other users' files.

Not a bug but a limitation.

See merge request !4

8 years agoUpdate README.md
Craig Small [Sun, 11 Sep 2016 03:29:27 +0000 (03:29 +0000)]
Update README.md

8 years agoUpdating manpage info about fuser not seeing other users' files.
Jan Rybar [Mon, 18 Jul 2016 16:57:31 +0000 (18:57 +0200)]
Updating manpage info about fuser not seeing other users' files.
Not a bug but a limitation.

8 years agopstree: document hide threads option in manpage
Craig Small [Fri, 17 Jun 2016 22:02:27 +0000 (08:02 +1000)]
pstree: document hide threads option in manpage

The previous commit added the -T option to pstree to hide
threads. The man page has been updated to suit.

References:
 commit b9bd5efe2c5f894e25719bbbe9e25879afe5714b

Signed-off-by: Craig Small <csmall@dropbear.xyz>
8 years agoMerge branch 'hide_threads' into 'master'
Craig Small [Fri, 17 Jun 2016 22:00:10 +0000 (22:00 +0000)]
Merge branch 'hide_threads' into 'master'

Add option --hide-threads (-T) to hide threads from display

On desktop systems, there will usually be a gazillion of threads
(hello chrome!) that clutter the display. Add an option to optionally
hide these from showing up at all.

PS: Fwiw, I'd personally prefer to have threads hidden by default. If that's desired, I can update the patch to reverse the logic.

Cheers,
Christoph

See merge request !3

8 years agoprstat: Remove duplicate option in man page
Jan Rybar [Fri, 17 Jun 2016 21:55:26 +0000 (07:55 +1000)]
prstat: Remove duplicate option in man page

Fixes issue !3
Both raw and versions options appeared twice.

Signed-off-by: Craig Small <csmall@dropbear.xyz>
8 years agoAdd option --hide-threads (-T) to hide threads from display
Christoph Berg [Sat, 21 May 2016 08:41:24 +0000 (10:41 +0200)]
Add option --hide-threads (-T) to hide threads from display

On desktop systems, there will usually be a gazillion of threads
(hello chrome!) that clutter the display. Add an option to optionally
hide these from showing up at all.

8 years agoMerge branch 'fix/pslog_unterminated_string' into 'master'
Craig Small [Sun, 1 May 2016 05:36:22 +0000 (05:36 +0000)]
Merge branch 'fix/pslog_unterminated_string' into 'master'

pslog: fix unterminated string and memory leaks

Adding null terminator to buf string.

Cleaned a memory leak  calling closedir on /proc/$PID/fd,  that was left open.

`==29483==
==29483== HEAP SUMMARY:
==29483==     in use at exit: 0 bytes in 0 blocks
==29483==   total heap usage: 256 allocs, 256 frees, 70,990 bytes allocated
==29483==
==29483== All heap blocks were freed -- no leaks are possible
==29483==
==29483== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
==29483== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)`

See merge request !2

8 years agopslog: fix unterminated string and memory leaks
Vito Mule [Sun, 1 May 2016 01:52:57 +0000 (02:52 +0100)]
pslog: fix unterminated string and memory leaks

8 years agomisc: Update gitignore and news for pslog
Craig Small [Sat, 30 Apr 2016 23:41:06 +0000 (09:41 +1000)]
misc: Update gitignore and news for pslog

8 years agoMerge branch 'master' into 'master'
Craig Small [Sat, 30 Apr 2016 23:14:40 +0000 (23:14 +0000)]
Merge branch 'master' into 'master'

Adding pslog(1): Report current log(s) path of a process

Simple binary to find the log(s) path for a given PID. Please review my code and highlight any mistake or anything missing. Thanks very much for your time.

`root@agent5:/home/vmule# pslog 701
Pid no 701:
Log path: /var/log/nginx/error.log
Log path: /var/log/nginx/error.log
Log path: /var/log/nginx/access.log
Log path: /var/log/nginx/www.puppetlabs.vm.access.log
Log path: /var/log/nginx/www.puppetlabs.vm.error.log`

See merge request !1

8 years agoadding plog
Vito Mule [Thu, 28 Apr 2016 17:30:41 +0000 (18:30 +0100)]
adding plog

8 years agoUpdate README.md
Craig Small [Wed, 27 Apr 2016 12:47:48 +0000 (12:47 +0000)]
Update README.md

8 years agoMerge branch 'master' of gitlab.com:psmisc/psmisc
Craig Small [Thu, 28 Apr 2016 12:19:39 +0000 (22:19 +1000)]
Merge branch 'master' of gitlab.com:psmisc/psmisc

8 years agokillall: fix malloc branch logic for pgid
Craig Small [Thu, 28 Apr 2016 12:16:51 +0000 (22:16 +1000)]
killall: fix malloc branch logic for pgid

A fix to remove some spurious code removed a branch and an else
but did not invert the if check like it should. It meant if
process groups were used the spaces was not allocated.

References:
 commit 1fcc2b17ab8e88a023d3cd38057e9a5fe93d7313

8 years agoUpdate README.md
Craig Small [Wed, 27 Apr 2016 12:47:48 +0000 (12:47 +0000)]
Update README.md

8 years agomisc: Fix some memory leaks from coverity
Craig Small [Mon, 25 Apr 2016 12:35:47 +0000 (22:35 +1000)]
misc: Fix some memory leaks from coverity

Ran psmisc through coverity scan and it found a few places
where programs were not checking return values or freeing
malloc'ed items.

8 years agomisc: Update README.md
Craig Small [Mon, 25 Apr 2016 11:04:00 +0000 (21:04 +1000)]
misc: Update README.md

The README appears a little odd on gitlab, this should make things
clearer.

8 years agofuser,prtstat: use standard sscanf flag for alloc
Craig Small [Mon, 25 Apr 2016 06:57:35 +0000 (16:57 +1000)]
fuser,prtstat: use standard sscanf flag for alloc

Previously GNU libc supported the a option in scanf, e.g.
%as to allocate the buffer for the scanned string. The manual
recommends to use m instead as it follows the standard.

8 years agofuser/killall/pstree: Mention all flags in usage
Sebastian Rasmussen [Sun, 20 Mar 2016 12:50:59 +0000 (13:50 +0100)]
fuser/killall/pstree: Mention all flags in usage

Make sure that all flags are mentioned in each tool and
also sort out stray whitespace and improper linebreaking.

8 years agofuser: increase mpoint length of for octal escape
Jaromír Cápík [Mon, 25 Apr 2016 01:25:38 +0000 (11:25 +1000)]
fuser: increase mpoint length of for octal escape

The mount point is set to PATH_MAX but if octal escaping is used
then it will exceed this limit.

Fixes rhbz#1078887 (no url, its a restricted access bug)

References:
 https://sourceforge.net/p/psmisc/patches/37/

Signed-off-by: Craig Small <csmall@enc.com.au>
8 years agotest: Update gitlab test for shared runner
Craig Small [Mon, 25 Apr 2016 00:36:42 +0000 (10:36 +1000)]
test: Update gitlab test for shared runner

The shared runner needs additional files to build psmisc
and run the tests.

8 years agoMinor issues about verbose in fuser.1
Craig Small [Mon, 4 Apr 2016 11:35:04 +0000 (21:35 +1000)]
Minor issues about verbose in fuser.1

access->accessed
Added note about access '.' in verbose mode.

References:
 https://sourceforge.net/p/psmisc/bugs/70/

8 years agofuser: include sysmacros.h for makedev
Mike Frysinger [Mon, 7 Mar 2016 19:58:33 +0000 (14:58 -0500)]
fuser: include sysmacros.h for makedev

BSD/Linux define makedev in the sysmacros.h header.  Include it directly
instead of relying on types.h pulling it in for us.

Signed-off-by: Craig Small <csmall@enc.com.au>
9 years agofixed gitlab ci file
Craig Small [Sat, 24 Oct 2015 03:47:04 +0000 (14:47 +1100)]
fixed gitlab ci file

9 years agobuildsys: attempt to downgrade gettext version
Craig Small [Tue, 7 Jul 2015 12:40:05 +0000 (22:40 +1000)]
buildsys: attempt to downgrade gettext version

9 years agorenamed gitlab file to correct name;
Craig Small [Tue, 7 Jul 2015 12:32:57 +0000 (22:32 +1000)]
renamed gitlab file to correct name;

9 years agoAdded gitlab CI config file
Craig Small [Tue, 7 Jul 2015 12:31:47 +0000 (22:31 +1000)]
Added gitlab CI config file

9 years agodoc: Rename README to markdown file
Craig Small [Tue, 30 Jun 2015 13:09:52 +0000 (23:09 +1000)]
doc: Rename README to markdown file

9 years agobuildsys: more updates and fixes for distcheck
Craig Small [Tue, 30 Jun 2015 13:05:39 +0000 (23:05 +1000)]
buildsys: more updates and fixes for distcheck

9 years agobuildsys: Updates to the build system
Craig Small [Tue, 30 Jun 2015 12:44:49 +0000 (22:44 +1000)]
buildsys: Updates to the build system

Fixed the makefiles and some other components

9 years agokillall: fix alloc on command
Craig Small [Thu, 25 Jun 2015 11:39:47 +0000 (21:39 +1000)]
killall: fix alloc on command

The command variable wasn't assigned before it was freed in the
loop. This change fixes that.

9 years agofuser: rework string comparison
Craig Small [Thu, 25 Jun 2015 11:31:17 +0000 (21:31 +1000)]
fuser: rework string comparison

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/

9 years agodoc: fix typo in kill1ll.1
Craig Small [Wed, 3 Jun 2015 11:18:27 +0000 (21:18 +1000)]
doc: fix typo in kill1ll.1

Lev reported that we were saying in the manpage that killall uses
expended regular expression and not exTended regular expression.

9 years agofuser: -k return status based on any found
Craig Small [Sat, 14 Mar 2015 22:08:12 +0000 (09:08 +1100)]
fuser: -k return status based on any found

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>
9 years agoAvoid possible crash and memory leak in killall
Werner Fink [Sat, 14 Mar 2015 21:39:12 +0000 (08:39 +1100)]
Avoid possible crash and memory leak in killall

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>
9 years agoFixed typo in fuser.1 Debian #763374
Craig Small [Sun, 25 Jan 2015 22:54:59 +0000 (09:54 +1100)]
Fixed typo in fuser.1 Debian #763374

10 years agoUpdated translations
Craig Small [Tue, 23 Dec 2014 21:38:15 +0000 (08:38 +1100)]
Updated translations

Imported the latest po files from the translation
project.

10 years agokillall younger and older flags
Craig Small [Tue, 23 Dec 2014 21:35:34 +0000 (08:35 +1100)]
killall younger and older flags

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.

10 years agoRemoved early free on name_len
Craig Small [Mon, 22 Dec 2014 21:58:47 +0000 (08:58 +1100)]
Removed early free on name_len

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.

10 years agoInclude <limits.h> for PATH_MAX
Paul Barker [Sun, 24 Aug 2014 14:53:12 +0000 (14:53 +0000)]
Include <limits.h> for PATH_MAX

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>
10 years agoNote S patch #34 for pstree
Craig Small [Tue, 3 Jun 2014 12:14:06 +0000 (22:14 +1000)]
Note S patch #34 for pstree

10 years agopstree: Ignore processes that disappear before reading cmdline
Martin Schwenke [Tue, 25 Feb 2014 19:55:21 +0000 (06:55 +1100)]
pstree: Ignore processes that disappear before reading cmdline

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>
10 years agodefine PATH_MAX for freebsd
Craig Small [Tue, 3 Jun 2014 12:04:49 +0000 (22:04 +1000)]
define PATH_MAX for freebsd

10 years agoFix some segfaults due to freeing too early
Craig Small [Thu, 22 May 2014 11:56:42 +0000 (21:56 +1000)]
Fix some segfaults due to freeing too early

10 years agoFixed v4 versus v6 problem
Craig Small [Mon, 19 May 2014 12:56:50 +0000 (22:56 +1000)]
Fixed v4 versus v6 problem

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

10 years agoUpdate translations
Craig Small [Mon, 19 May 2014 12:32:17 +0000 (22:32 +1000)]
Update translations

10 years agoMinor fixes due to Coverity reporting
Craig Small [Mon, 19 May 2014 12:31:34 +0000 (22:31 +1000)]
Minor fixes due to Coverity reporting

10 years agoMerge branch 'master' of ssh://git.code.sf.net/p/psmisc/code
Craig Small [Fri, 28 Feb 2014 22:22:32 +0000 (09:22 +1100)]
Merge branch 'master' of ssh://git.code.sf.net/p/psmisc/code

10 years agoFull thread display for pstree an option
Allan Wirth [Fri, 28 Feb 2014 22:09:19 +0000 (09:09 +1100)]
Full thread display for pstree an option

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>
10 years agoFull thread display for pstree an option
Allan Wirth [Fri, 28 Feb 2014 22:09:19 +0000 (09:09 +1100)]
Full thread display for pstree an option

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>
10 years agoTypo in fuser makes -M on all the time
Brad Jorsch [Fri, 28 Feb 2014 10:55:02 +0000 (21:55 +1100)]
Typo in fuser makes -M on all the time

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>
10 years agoUpdated po files
Craig Small [Fri, 28 Feb 2014 10:51:17 +0000 (21:51 +1100)]
Updated po files

Signed-off-by: Craig Small <csmall@enc.com.au>
10 years agoLast translation update for this version v22.21
Craig Small [Sun, 16 Feb 2014 07:08:00 +0000 (18:08 +1100)]
Last translation update for this version

Updated the ones that came in later.

Signed-off-by: Craig Small <csmall@enc.com.au>
10 years agoUpdate the translations
Craig Small [Mon, 3 Feb 2014 10:56:53 +0000 (21:56 +1100)]
Update the translations

Signed-off-by: Craig Small <csmall@enc.com.au>
10 years agoAnother PO file update
Craig Small [Sun, 2 Feb 2014 06:09:04 +0000 (17:09 +1100)]
Another PO file update

Signed-off-by: Craig Small <csmall@enc.com.au>
10 years agoUpdate po files from TP site
Craig Small [Sun, 2 Feb 2014 06:07:51 +0000 (17:07 +1100)]
Update po files from TP site

rsyned the latest po files from TP site, ready for the last update.

Signed-off-by: Craig Small <csmall@enc.com.au>
10 years agopstree: fclose fopened files
Craig Small [Sun, 2 Feb 2014 06:02:36 +0000 (17:02 +1100)]
pstree: fclose fopened files

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>
10 years agofuser -M and -m flags work either way
Craig Small [Fri, 31 Jan 2014 13:09:35 +0000 (00:09 +1100)]
fuser -M and -m flags work either way

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>
10 years agoPort peekfd to m68k
Andreas Schwab [Thu, 17 Oct 2013 10:32:56 +0000 (12:32 +0200)]
Port peekfd to m68k

10 years agoFixing null pointer dereference
Jaromir Capik [Fri, 31 Jan 2014 11:45:26 +0000 (22:45 +1100)]
Fixing null pointer dereference

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>
10 years agoFixed -p -g typo in psmisc.1
Craig Small [Fri, 31 Jan 2014 11:12:57 +0000 (22:12 +1100)]
Fixed -p -g typo in psmisc.1

The explanation for -g had an errant -p in the description.

References: https://sourceforge.net/p/psmisc/bugs/61/

11 years agoUpdate for 22.21
Craig Small [Wed, 9 Oct 2013 06:34:04 +0000 (17:34 +1100)]
Update for 22.21

Updated the translation files
Minor fix in killall man page

11 years agopstree shows threads correct names.
Craig Small [Sun, 29 Sep 2013 05:16:08 +0000 (15:16 +1000)]
pstree shows threads correct names.

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!

11 years agoUpdate of the po/pot files
Craig Small [Sun, 11 Aug 2013 12:44:48 +0000 (22:44 +1000)]
Update of the po/pot files

11 years agopstree: introduce namespace transition information
Aristeu Rozanski [Thu, 25 Apr 2013 15:35:15 +0000 (11:35 -0400)]
pstree: introduce namespace transition information

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>
11 years agopstree: introduce support for namespaces
Aristeu Rozanski [Wed, 24 Apr 2013 19:32:35 +0000 (15:32 -0400)]
pstree: introduce support for namespaces

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>
11 years agopstree uses COLUMNS environement variable
Craig Small [Tue, 16 Jul 2013 11:39:09 +0000 (21:39 +1000)]
pstree uses COLUMNS environement variable

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

11 years agoAdded missing comma from fuser(1)
Craig Small [Mon, 1 Apr 2013 07:33:34 +0000 (18:33 +1100)]
Added missing comma from fuser(1)

Actuallly it was a missing R because \f, shows nothing but \fR, shows a
comma.
Bug-Debian: http://bugs.debian.org/702391

11 years agoignore tar.gz and config directory
Craig Small [Thu, 21 Feb 2013 11:56:50 +0000 (22:56 +1100)]
ignore tar.gz and config directory

11 years agodoesn't complain about "not a directory"
Han Pingtian [Thu, 20 Dec 2012 03:31:50 +0000 (11:31 +0800)]
doesn't complain about "not a directory"

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>
11 years agoUpdate po files
Craig Small [Thu, 21 Feb 2013 11:51:23 +0000 (22:51 +1100)]
Update po files

11 years agouse AC_CANONICAL_HOST
Mike Frysinger [Tue, 19 Feb 2013 19:44:50 +0000 (14:44 -0500)]
use AC_CANONICAL_HOST

--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>
12 years agopstree compiles with SE Linux
Craig Small [Sat, 6 Oct 2012 23:52:46 +0000 (10:52 +1100)]
pstree compiles with SE Linux

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/

12 years agoupdated with distcheck v22.20
Craig Small [Thu, 20 Sep 2012 12:16:35 +0000 (22:16 +1000)]
updated with distcheck

12 years agoupdate translations
Craig Small [Thu, 20 Sep 2012 12:06:22 +0000 (22:06 +1000)]
update translations

12 years agofreebsd pid 0 and no loops
Craig Small [Thu, 20 Sep 2012 11:58:34 +0000 (21:58 +1000)]
freebsd pid 0 and no loops

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>
12 years agoUpdated po files v22.20rc1
Craig Small [Fri, 31 Aug 2012 04:47:16 +0000 (14:47 +1000)]
Updated po files

12 years agoforce process age >= 0
Craig Small [Fri, 31 Aug 2012 04:37:57 +0000 (14:37 +1000)]
force process age >= 0

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

12 years agofuser finds unix sockets
Craig Small [Fri, 31 Aug 2012 04:21:19 +0000 (14:21 +1000)]
fuser finds unix sockets

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.

12 years agopstree finds orphans
Craig Small [Fri, 31 Aug 2012 00:05:24 +0000 (10:05 +1000)]
pstree finds orphans

Commit 26f9b6c1553d021c0bf9dd85f0647dc6e210948d while fixing the missing
root pid problem introduced another problem where PIDs are out of order.
A process that has a lower PID than its PPID would appear twice with
the tree breaking in strange ways.

We now scan the entire process tree first then perform two checks
 if PID==1 is missing add it
 if a process has no parent, then make it a child of PID==1, either the
 real one or the faked one made in step 1

As this is done after all procsses are found, we don't get the previous
breakage.

Ref: https://sourceforge.net/tracker/?func=detail&aid=3537508&group_id=15273&atid=115273

Signed-off-by: Craig Small <csmall@users.sourceforge.net>
12 years agofuser -m regression
Craig Small [Thu, 30 Aug 2012 22:09:45 +0000 (08:09 +1000)]
fuser -m regression

While fuser -m /boot worked, fuser -m /dev/blah would show everything.
This was because the filesystem for /dev was added as a target, not the
filesystem /dev/blah.

This simple fix suggested by SF user hanpt works well.

Ref: https://sourceforge.net/tracker/?func=detail&aid=3559232&group_id=15273&atid=115273
Signed-off-by: Craig Small <csmall@users.sourceforge.net>
12 years agoMerge branch 'master' of ssh://psmisc.git.sourceforge.net/gitroot/psmisc/psmisc
Craig Small [Sat, 28 Jul 2012 09:00:56 +0000 (19:00 +1000)]
Merge branch 'master' of ssh://psmisc.git.sourceforge.net/gitroot/psmisc/psmisc

Conflicts:
doc/killall.1
doc/pstree.1

12 years agoCleanup man pages
Craig Small [Sat, 28 Jul 2012 08:56:49 +0000 (18:56 +1000)]
Cleanup man pages

Date uses standard format
Authors section removed
Copyright header in comments

12 years agodocs: clean up pstree.1
Sami Kerola [Thu, 26 Jul 2012 17:35:08 +0000 (19:35 +0200)]
docs: clean up pstree.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agodocs: clean up prtstat.1
Sami Kerola [Thu, 26 Jul 2012 17:34:31 +0000 (19:34 +0200)]
docs: clean up prtstat.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agodocs: clean up peekfd.1
Sami Kerola [Thu, 26 Jul 2012 17:34:18 +0000 (19:34 +0200)]
docs: clean up peekfd.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agodocs: clean up killall.1
Sami Kerola [Thu, 26 Jul 2012 17:34:06 +0000 (19:34 +0200)]
docs: clean up killall.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agodocs: clean up fuser.1
Sami Kerola [Thu, 26 Jul 2012 17:33:42 +0000 (19:33 +0200)]
docs: clean up fuser.1

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agomisc: fix misspell-check warnings
Sami Kerola [Thu, 26 Jul 2012 16:38:34 +0000 (18:38 +0200)]
misc: fix misspell-check warnings

https://github.com/lyda/misspell-check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agopstree sorts properly on names
Craig Small [Fri, 20 Jul 2012 12:32:27 +0000 (22:32 +1000)]
pstree sorts properly on names

pstree added temporary parents to processes, so if a child process
was lexigraphically before the parents or its "aunties and uncles"
then they were sorted with the parent temporary name "?".

This patch reorders the children in the parents list when they
are renamed.

12 years agoStart of test scripts for psmisc
Craig Small [Fri, 22 Jun 2012 11:28:14 +0000 (21:28 +1000)]
Start of test scripts for psmisc

12 years agoRolled to version 22.19 and fix killall killing all v22.19
Craig Small [Thu, 21 Jun 2012 12:09:29 +0000 (22:09 +1000)]
Rolled to version 22.19 and fix killall killing all

killall would kill all processes with no arguments, was missing an exit