diff options
Diffstat (limited to 'source/a')
-rwxr-xr-x | source/a/procps-ng/procps-ng.SlackBuild | 8 | ||||
-rw-r--r-- | source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff | 20 |
2 files changed, 26 insertions, 2 deletions
diff --git a/source/a/procps-ng/procps-ng.SlackBuild b/source/a/procps-ng/procps-ng.SlackBuild index 2399950b..32010ad1 100755 --- a/source/a/procps-ng/procps-ng.SlackBuild +++ b/source/a/procps-ng/procps-ng.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2005-2018 Patrick J. Volkerding, Sebeka, Minnesota, USA +# Copyright 2005-2019 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -27,7 +27,7 @@ VERSION=${VERSION:-3.3.16} PSMISCVER=${PSMISCVER:-23.3} PROCINFONGVER=${PROCINFONGVER:-2.0.304} PROCINFOVER=${PROCINFOVER:-18} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -81,6 +81,10 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+ +# Revert to hardcoded command string size from procps-ng-3.3.15, as the +# newer stack-based allocation fails in some cases where ulimit is unlimited: +zcat $CWD/procps-ng.pgrep.CMDSTRSIZE.diff.gz | patch -p1 --verbose || exit 1 + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ diff --git a/source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff b/source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff new file mode 100644 index 00000000..4ff321d0 --- /dev/null +++ b/source/a/procps-ng/procps-ng.pgrep.CMDSTRSIZE.diff @@ -0,0 +1,20 @@ +--- ./pgrep.c.orig 2019-10-27 06:32:58.339230954 -0500 ++++ ./pgrep.c 2019-12-21 13:38:57.229656940 -0600 +@@ -42,6 +42,8 @@ + #define EXIT_FATAL 3 + #define XALLOC_EXIT_CODE EXIT_FATAL + ++#define CMDSTRSIZE 4096 ++ + #include "c.h" + #include "fileutils.h" + #include "nsutils.h" +@@ -497,7 +499,7 @@ + regex_t *preg; + pid_t myself = getpid(); + struct el *list = NULL; +- long cmdlen = sysconf(_SC_ARG_MAX) * sizeof(char); ++ long cmdlen = CMDSTRSIZE; + char *cmdline = xmalloc(cmdlen); + char *cmdsearch = xmalloc(cmdlen); + char *cmdoutput = xmalloc(cmdlen); |