1 diff -ur a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c
2 --- a/Source/kwsys/ProcessUNIX.c 2024-04-11 07:12:19.000000000 -0700
3 +++ b/Source/kwsys/ProcessUNIX.c 2024-05-15 10:41:00.286160616 -0700
4 @@ -2501,20 +2501,20 @@
5 have two integers to store: the pid and then the ppid. */
6 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \
7 defined(__OpenBSD__) || defined(__GLIBC__) || defined(__GNU__)
8 -# define KWSYSPE_PS_COMMAND "ps axo pid,ppid"
9 +# define KWSYSPE_PS_COMMAND "@ps@ axo pid,ppid"
10 # define KWSYSPE_PS_FORMAT "%d %d\n"
11 #elif defined(__sun) && (defined(__SVR4) || defined(__svr4__)) /* Solaris */
12 -# define KWSYSPE_PS_COMMAND "ps -e -o pid,ppid"
13 +# define KWSYSPE_PS_COMMAND "@ps@ -e -o pid,ppid"
14 # define KWSYSPE_PS_FORMAT "%d %d\n"
15 #elif defined(__hpux) || defined(__sun__) || defined(__sgi) || \
16 defined(_AIX) || defined(__sparc)
17 -# define KWSYSPE_PS_COMMAND "ps -ef"
18 +# define KWSYSPE_PS_COMMAND "@ps@ -ef"
19 # define KWSYSPE_PS_FORMAT "%*s %d %d %*[^\n]\n"
20 #elif defined(__QNX__)
21 -# define KWSYSPE_PS_COMMAND "ps -Af"
22 +# define KWSYSPE_PS_COMMAND "@ps@ -Af"
23 # define KWSYSPE_PS_FORMAT "%*d %d %d %*[^\n]\n"
24 #elif defined(__CYGWIN__)
25 -# define KWSYSPE_PS_COMMAND "ps aux"
26 +# define KWSYSPE_PS_COMMAND "@ps@ aux"
27 # define KWSYSPE_PS_FORMAT "%d %d %*[^\n]\n"
30 diff -ur a/Source/kwsys/SystemInformation.cxx b/Source/kwsys/SystemInformation.cxx
31 --- a/Source/kwsys/SystemInformation.cxx 2024-04-11 07:12:19.000000000 -0700
32 +++ b/Source/kwsys/SystemInformation.cxx 2024-05-15 10:40:00.901059278 -0700
34 long long memUsed = 0;
36 std::ostringstream oss;
37 - oss << "ps -o rss= -p " << pid;
38 + oss << "@ps@ -o rss= -p " << pid;
39 FILE* file = popen(oss.str().c_str(), "r");
40 if (file == nullptr) {