mirror of
git://slackware.nl/current.git
synced 2025-01-10 05:25:51 +01:00
21 lines
567 B
Diff
21 lines
567 B
Diff
|
--- ./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);
|