From 8bdbc6149709e4c5e9abfe9a02cdc5101114901a Mon Sep 17 00:00:00 2001 From: Han Pingtian Date: Sat, 15 May 2021 14:23:28 -0700 Subject: 33465: use prctl() for "jobs -Z" where available Bart apologizes for waiting 7 years to apply this change. --- Src/jobs.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Src') diff --git a/Src/jobs.c b/Src/jobs.c index 0d4993554..f0b337110 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -2270,6 +2270,13 @@ bin_fg(char *name, char **argv, Options ops, int func) memcpy(hackzero, *argv, len); memset(hackzero + len, 0, hackspace - len); #endif + +#ifdef HAVE_PRCTL + /* try to change /proc/$$/comm which will * + * be used when checking with "ps -e" */ +#include + prctl(PR_SET_NAME, *argv); +#endif unqueue_signals(); return 0; } -- cgit 1.4.1