mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-11 10:06:19 +02:00
33465: use prctl() for "jobs -Z" where available
Bart apologizes for waiting 7 years to apply this change.
This commit is contained in:
parent
4fa4dcad17
commit
8bdbc61497
|
@ -1,5 +1,8 @@
|
||||||
2021-05-15 Bart Schaefer <schaefer@zsh.org>
|
2021-05-15 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* Han Pingtian: 33465 (very belatedly): use prctl() for "jobs -Z"
|
||||||
|
where available
|
||||||
|
|
||||||
* Vincent Lefevre: 48723: Src/math.c: locale-safe recognition of
|
* Vincent Lefevre: 48723: Src/math.c: locale-safe recognition of
|
||||||
"Inf" and "NaN" constants
|
"Inf" and "NaN" constants
|
||||||
|
|
||||||
|
|
|
@ -2270,6 +2270,13 @@ bin_fg(char *name, char **argv, Options ops, int func)
|
||||||
memcpy(hackzero, *argv, len);
|
memcpy(hackzero, *argv, len);
|
||||||
memset(hackzero + len, 0, hackspace - len);
|
memset(hackzero + len, 0, hackspace - len);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_PRCTL
|
||||||
|
/* try to change /proc/$$/comm which will *
|
||||||
|
* be used when checking with "ps -e" */
|
||||||
|
#include <sys/prctl.h>
|
||||||
|
prctl(PR_SET_NAME, *argv);
|
||||||
|
#endif
|
||||||
unqueue_signals();
|
unqueue_signals();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2065,6 +2065,12 @@ AH_TEMPLATE([HAVE_SETPROCTITLE],
|
||||||
AC_CHECK_FUNC(setproctitle,AC_DEFINE(HAVE_SETPROCTITLE),
|
AC_CHECK_FUNC(setproctitle,AC_DEFINE(HAVE_SETPROCTITLE),
|
||||||
AC_SEARCH_LIBS(setproctitle,util,AC_DEFINE(HAVE_SETPROCTITLE)))
|
AC_SEARCH_LIBS(setproctitle,util,AC_DEFINE(HAVE_SETPROCTITLE)))
|
||||||
|
|
||||||
|
dnl CHECK FOR prctl() FOR jobs -Z / ARGV0 when checking with ps -e
|
||||||
|
AH_TEMPLATE([HAVE_PRCTL],
|
||||||
|
[Define to 1 if the system supports `prctl' to change process name])
|
||||||
|
AC_CHECK_FUNC(prctl,AC_DEFINE(HAVE_PRCTL),
|
||||||
|
AC_SEARCH_LIBS(prctl,c,AC_DEFINE(HAVE_PRCTL)))
|
||||||
|
|
||||||
dnl -------------
|
dnl -------------
|
||||||
dnl CHECK FOR NIS
|
dnl CHECK FOR NIS
|
||||||
dnl -------------
|
dnl -------------
|
||||||
|
|
Loading…
Reference in New Issue