]> granicus.if.org Git - psmisc/log
psmisc
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

12 years agoUpdate po files with last change v22.18
Craig Small [Sun, 17 Jun 2012 05:21:04 +0000 (15:21 +1000)]
Update po files with last change

12 years agoFixed -w usage SFbug:3528478
Craig Small [Sat, 16 Jun 2012 09:07:12 +0000 (19:07 +1000)]
Fixed -w usage SFbug:3528478

12 years agoUpdated readme and po files
Craig Small [Sat, 16 Jun 2012 09:03:58 +0000 (19:03 +1000)]
Updated readme and po files

12 years agoRemoved remants of pidof
Craig Small [Sat, 16 Jun 2012 08:49:27 +0000 (18:49 +1000)]
Removed remants of pidof

pidof has been in util-linux for a while, but there has been some
remaining code in killall which is now removed.

12 years agokillall max names fixed
Craig Small [Sat, 16 Jun 2012 08:44:34 +0000 (18:44 +1000)]
killall max names fixed

The maximum number of names was not documented and was out by one.
Problem reported by J.A. Bezemer
Bug-Debian: http://bugs.debian.org/677428

12 years agokillall assert lifetime
Craig Small [Sat, 16 Jun 2012 08:09:24 +0000 (18:09 +1000)]
killall assert lifetime

Sometimes killall younger-than or older-than would trigger an assert
failure because the process age was too small and was close to zero.

Bug reported and analysed by Frédéric Brière <fbriere@fbriere.net>
Bug-Debian: http://bugs.debian.org/628617

12 years agoAnother sed from from same source
Craig Small [Fri, 15 Jun 2012 11:56:09 +0000 (21:56 +1000)]
Another sed from from same source

12 years agosed uses proper BRE
Craig Small [Mon, 11 Jun 2012 01:36:55 +0000 (11:36 +1000)]
sed uses proper BRE

Apparently even though [0-9]+ works most of the time, its not proper BRE
and doesn't work ALL of the time. Replacing this with [0-9][0-9]* makes
everyone happy.

Noticed by Rich from the busybox project and reported by John Spencer
of the same project.

12 years agoConditional install fuser.1
Craig Small [Mon, 11 Jun 2012 01:29:03 +0000 (11:29 +1000)]
Conditional install fuser.1

If fuser binary is not installed, don't install fuser man page either

12 years agoAdded AC_CANONICAL_TARGET to configure.ac
Craig Small [Mon, 11 Jun 2012 01:00:52 +0000 (11:00 +1000)]
Added AC_CANONICAL_TARGET to configure.ac

This line gives you target_os which is needed for the hurd
dependency lines.

Bug-Debian: http://bugs.debian.org/673485

12 years agoUpdate configure.ac to 22.17 v22.17
Craig Small [Sat, 2 Jun 2012 05:55:52 +0000 (15:55 +1000)]
Update configure.ac to 22.17

12 years agoFinal 22.17 release changes
Craig Small [Sat, 2 Jun 2012 05:37:00 +0000 (15:37 +1000)]
Final 22.17 release changes

12 years agoUpdated language files
Craig Small [Sat, 2 Jun 2012 05:33:04 +0000 (15:33 +1000)]
Updated language files

My thanks again to all the translators for the translation project who
work on these translations.

12 years agoMade rc1 ready for the translators
Craig Small [Sun, 20 May 2012 01:24:13 +0000 (11:24 +1000)]
Made rc1 ready for the translators

12 years agopstree displays PGIDs
Craig Small [Sat, 19 May 2012 23:59:01 +0000 (09:59 +1000)]
pstree displays PGIDs

Patch based upon a patch submitted by Alan Grow.
The -g flag shows program group IDs, much like the PIDs display.

Bug-Sourceforge:
http://sourceforge.net/tracker/?func=detail&aid=3471056&group_id=15273&atid=315273

12 years ago3 fixes for Cygwin
Corinna Vinschen [Sat, 19 May 2012 08:54:35 +0000 (18:54 +1000)]
3 fixes for Cygwin

The attached patch fixes three issues of fuser on Cygwin.:

- Cygwin does not support /proc/net/unix. The call to fill_unix_cache
  always generates an error message that /proc/net/unix couldn't be
  found, so the patch disables the call for Cygwin. An alternative
  fix would be to avoid the error message entirely.

- `ls /dev' on Cygwin only lists manually added entries to /dev, not the
  default files suported by Cygwin internally. Also,
  /proc/$PID/mountinfo doesn't exist up to Cygwin 1.7.11. This
  breaks fuser when using the _LISTS_H option.

- If you don't include lists.h, the code in check_dir doesn't work well.
  st.st_ino is never set to 0, so the timeout(stat, ...) is never
  called. Also, thedev never gets a valid value in this case, but it's
  used subsequently for comparisons.

12 years agoFake pstree root with kernels with hidepid
Arkadiusz Miskiewicz [Sat, 19 May 2012 08:39:02 +0000 (18:39 +1000)]
Fake pstree root with kernels with hidepid

Kernels that hide pids hide pid=1 which pstree needs to show any
output.  If pstree detects this it now makes a "fake" root.

Bug-Sourceforge: https://sourceforge.net/tracker/?func=detail&aid=3509672&group_id=15273&atid=115273
Signed-off-by: Craig Small <csmall@enc.com.au>
12 years agofuser compiles with PIE
Craig Small [Sat, 19 May 2012 08:32:57 +0000 (18:32 +1000)]
fuser compiles with PIE

Some people have reported that fuser, specifically src/lists won't
compile with PIE enabled. This tiny patch fixes it.

Bug-Gentoo: http://bugs.gentoo.org/394443
Bug-Gentoo: http://bugs.gentoo.org/401851
Bug-Sourceforge: https://sourceforge.net/tracker/?func=detail&aid=3504801&group_id=15273&atid=115273

12 years agoUpdated PO files ready for dist
Craig Small [Sat, 19 May 2012 08:23:38 +0000 (18:23 +1000)]
Updated PO files ready for dist

12 years agoMerge branch 'master' of ssh://psmisc.git.sourceforge.net/gitroot/psmisc/psmisc
Craig Small [Sat, 19 May 2012 08:15:40 +0000 (18:15 +1000)]
Merge branch 'master' of ssh://psmisc.git.sourceforge.net/gitroot/psmisc/psmisc

Conflicts:
ChangeLog
src/fuser.c

12 years agoRemove fuser out of target for hurd-i386
Samuel Thibault [Sat, 19 May 2012 08:09:41 +0000 (18:09 +1000)]
Remove fuser out of target for hurd-i386

hurd-i386 does not have PATH_MAX which means fuser won't compile.
However the archtecture cannot use fuser anyway so we now don't
even try to compile it for hurd-i386

Bug-Debian: http://bugs.debian.org/673485
Signed-off-by: Craig Small <csmall@enc.com.au>
12 years agoUse --enable-timeout-stat as well as --enable-timeout-stat=static
Werner Fink [Tue, 13 Mar 2012 15:15:43 +0000 (16:15 +0100)]
Use --enable-timeout-stat as well as --enable-timeout-stat=static
for a static background process which does the final stat system calls

Signed-off-by: Werner Fink <werner@suse.de>
12 years agoAdd timeout.c/timeout.h for static background process for doing the stat system calls
Werner Fink [Tue, 13 Mar 2012 13:49:52 +0000 (14:49 +0100)]
Add timeout.c/timeout.h for static background process for doing the stat system calls

Signed-off-by: Werner Fink <werner@suse.de>
12 years agoReally add ASCII null at command string in add_proc() of pstree.c
Werner Fink [Tue, 13 Mar 2012 12:39:52 +0000 (13:39 +0100)]
Really add ASCII null at command string in add_proc() of pstree.c

Signed-off-by: Werner Fink <werner@suse.de>
12 years agoUpdated changelog to 22.17
Craig Small [Sat, 3 Mar 2012 21:50:52 +0000 (08:50 +1100)]
Updated changelog to 22.17

12 years agofuser: Use correct WITH_TIMEOUT_STAT to conditionalize timeout()
Guillem Jover [Wed, 12 Oct 2011 21:31:25 +0000 (23:31 +0200)]
fuser: Use correct WITH_TIMEOUT_STAT to conditionalize timeout()

Signed-off-by: Guillem Jover <guillem@hadrons.org>
12 years agopo file refresh v22.16
Craig Small [Sun, 26 Feb 2012 04:22:38 +0000 (15:22 +1100)]
po file refresh

12 years agoNull terminate some strings
Craig Small [Sun, 26 Feb 2012 04:18:42 +0000 (15:18 +1100)]
Null terminate some strings

12 years agokillall: fix potential string overflow [cppcheck]
Sami Kerola [Wed, 8 Feb 2012 21:35:32 +0000 (22:35 +0100)]
killall: fix potential string overflow [cppcheck]

[src/killall.c:138]: (warning) scanf without field width limits can crash with huge input data

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
12 years agoBetter comm_len fix
Craig Small [Thu, 9 Feb 2012 20:03:34 +0000 (07:03 +1100)]
Better comm_len fix

The previous fix for comm_len broke checks for process exactly the right
length, this one fixes the original problem and doesn't break that
situation.

Added a variable to the conditional STAT code that was previously
outside the #ifdef and gave an unsed variable warning.

12 years agoAdded hardened CFLAGS
Craig Small [Fri, 27 Jan 2012 02:11:25 +0000 (13:11 +1100)]
Added hardened CFLAGS

Debian and Ubuntu (at the least) have some CFLAGS that harden the binary
for some typical attacks. psmisc now will have these flags on by default
but checks the compilier supports them.

12 years agoSet COMM_LEN to 18 to include brackets in name
Craig Small [Fri, 27 Jan 2012 01:02:48 +0000 (12:02 +1100)]
Set COMM_LEN to 18 to include brackets in name

Also use strncpy in case the command names grow.

12 years agoUpdated configure.ac to 22.15 v22.15
Craig Small [Thu, 26 Jan 2012 22:11:07 +0000 (09:11 +1100)]
Updated configure.ac to 22.15

12 years agopo file update due to distcheck
Craig Small [Wed, 25 Jan 2012 11:08:05 +0000 (22:08 +1100)]
po file update due to distcheck

12 years agoUpdated the language files
Craig Small [Wed, 25 Jan 2012 11:06:30 +0000 (22:06 +1100)]
Updated the language files

12 years agoMerge branch 'master' of ssh://psmisc.git.sourceforge.net/gitroot/psmisc/psmisc
Craig Small [Wed, 25 Jan 2012 10:52:47 +0000 (21:52 +1100)]
Merge branch 'master' of ssh://psmisc.git.sourceforge.net/gitroot/psmisc/psmisc

Conflicts:
ChangeLog

12 years agokillall: check fscanf return value
Sami Kerola [Wed, 4 Jan 2012 14:02:07 +0000 (15:02 +0100)]
killall: check fscanf return value

killall.c:138:10: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>
12 years agoprtstat: check fgets return value
Sami Kerola [Wed, 4 Jan 2012 13:54:29 +0000 (14:54 +0100)]
prtstat: check fgets return value

prtstat.c:234:8: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>
12 years agoMoved sigalarm function in fuser
Craig Small [Wed, 25 Jan 2012 10:44:57 +0000 (21:44 +1100)]
Moved sigalarm function in fuser

The sigalarm function was outside an #ifdef which meant it was defined
but not used with certain configure parameters.

Thanks to sami Kerola for pointing out the problem.

12 years agobuild-sys: fix AC_TRY_LINK warnings
Sami Kerola [Wed, 4 Jan 2012 13:49:08 +0000 (14:49 +0100)]
build-sys: fix AC_TRY_LINK warnings

configure.ac:71: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:71: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/gettext.m4:367: gt_INTL_MACOSX is expanded from...
m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
configure.ac:71: the top level
configure.ac:71: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:71: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...
m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
configure.ac:71: the top level
configure.ac:71: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:71: You should run autoupdate.
../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from...
../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from...
../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from...

Signed-off-by: Sami Kerola <sami.kerola@tomtom.com>