mirror of
https://github.com/vim/vim.git
synced 2025-11-09 10:37:17 -05:00
patch 8.2.2586: process id may be invalid
Problem: Process id may be invalid.
Solution: Use sysinfo.uptime to check for recent reboot. (suggested by Hugo
van der Sanden, closes #7947)
This commit is contained in:
29
src/auto/configure
vendored
29
src/auto/configure
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user