update to pstree-2.40

This commit is contained in:
sthen 2022-11-14 18:47:53 +00:00
parent 66297e5ca6
commit ead0c6e48d
3 changed files with 17 additions and 20 deletions

View File

@ -1,21 +1,19 @@
COMMENT = list processes as a tree
DISTNAME = pstree-2.39
GH_ACCOUNT = FredHucht
GH_PROJECT = pstree
GH_TAGNAME = v2.40
CATEGORIES = sysutils
HOMEPAGE = http://www.thp.uni-duisburg.de/pstree/
REVISION = 0
# GPL
PERMIT_PACKAGE = Yes
# uses pledge()
WANTLIB = c
MASTER_SITES = ftp://ftp.thp.uni-duisburg.de/pub/source/
WANTLIB = c
NO_TEST = Yes
WRKDIST = ${WRKDIR}
do-build:
cd ${WRKBUILD} && ${CC} ${CFLAGS} -o pstree pstree.c

View File

@ -1,2 +1,2 @@
SHA256 (pstree-2.39.tar.gz) = fJvDtD7m+TqbwFTu/x550woBysE9+BDilT4/wkrYR58=
SIZE (pstree-2.39.tar.gz) = 12929
SHA256 (pstree-2.40.tar.gz) = ZNYT2PZmhbKfE6gOCM3cCGFs8+MVoGksu/neDYqjdrM=
SIZE (pstree-2.40.tar.gz) = 25698

View File

@ -1,7 +1,8 @@
--- pstree.c.orig Wed May 13 14:24:47 2015
+++ pstree.c Thu Apr 21 08:23:00 2016
@@ -77,7 +77,7 @@ extern getargs(struct ProcInfo *, int, char *, int);
* (Net|Open|Free)BSD & Darwin merged by Ralf Meyer <ralf AT thp.Uni-Duisburg.DE>
Index: pstree.c
--- pstree.c.orig
+++ pstree.c
@@ -75,7 +75,7 @@ extern getargs(struct ProcInfo *, int, char *, int);
* DragonFlyBSD contributed by Krzysztof Piecuch <piecuch AT kpiecuch.pl>
*/
# define HAS_PGID
-# define PSCMD "ps -axwwo user,pid,ppid,pgid,command"
@ -9,12 +10,10 @@
# define PSFORMAT "%s %ld %ld %ld %[^\n]"
# define PSVARS P[i].name, &P[i].pid, &P[i].ppid, &P[i].pgid, P[i].cmd
# define PSVARSN 5
@@ -872,7 +872,12 @@ int main(int argc, char **argv) {
#ifdef ZOMBIES_HAVE_PID_0
FixZombies();
#endif
-
+
@@ -899,6 +899,11 @@ int main(int argc, char **argv) {
FixParentCycle();
#endif
+ if (pledge("stdio getpw proc tty", NULL) == -1) {
+ fprintf(stderr, "%s: pledge\n", Progname);
+ exit(1);