diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-10 21:26:37 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-10 21:26:37 +0100 |
commit | f52f0606ed9ea19bcfc3a8343af9958f2d99eaf7 (patch) | |
tree | 1fd2ccebf68aca966d10acdacf36a99badea66c5 /src/auto | |
parent | c23555de346c53f8f6c478635c2d9e5f2992dd7f (diff) | |
download | vim-git-f52f0606ed9ea19bcfc3a8343af9958f2d99eaf7.tar.gz |
patch 8.2.2586: process id may be invalidv8.2.2586
Problem: Process id may be invalid.
Solution: Use sysinfo.uptime to check for recent reboot. (suggested by Hugo
van der Sanden, closes #7947)
Diffstat (limited to 'src/auto')
-rwxr-xr-x | src/auto/configure | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/auto/configure b/src/auto/configure index 818349991..a9e2145d8 100755 --- a/src/auto/configure +++ b/src/auto/configure @@ -13918,6 +13918,35 @@ $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysinfo.uptime" >&5 +$as_echo_n "checking for sysinfo.uptime... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <sys/types.h> +#include <sys/sysinfo.h> +int +main () +{ + struct sysinfo sinfo; + long ut; + + (void)sysinfo(&sinfo); + ut = sinfo.uptime; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; }; $as_echo "#define HAVE_SYSINFO_UPTIME 1" >>confdefs.h + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysconf" >&5 $as_echo_n "checking for sysconf... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext |