summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--zshconfig.ac7
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 08440f550..35cd6d9e9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2001-06-08 Bart Schaefer <schaefer@zsh.org>
+
+ * 14796: zshconfig.ac: More reliable BROKEN_KILL_ESRCH test.
+
2001-06-07 Bart Schaefer <schaefer@zsh.org>
* 14792: Test/comptest: Don't import the current terminal type for
diff --git a/zshconfig.ac b/zshconfig.ac
index 3aee9fb08..0f4fe14e6 100644
--- a/zshconfig.ac
+++ b/zshconfig.ac
@@ -1377,10 +1377,9 @@ zsh_cv_sys_killesrch,
#include <errno.h>
main()
{
- int pid, ret;
- pid=getpid() + 10000;
- ret=kill(pid, 0);
- exit(ret<0 && errno!=ESRCH);
+ int pid = (getpid() + 10000) & 0xffffff;
+ while (pid && (kill(pid, 0) == 0 || errno != ESRCH)) pid >>= 1;
+ exit(errno!=ESRCH);
}
],
zsh_cv_sys_killesrch=yes,