mirror of
https://github.com/vim/vim.git
synced 2025-11-12 22:44:34 -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:
@@ -4095,6 +4095,20 @@ AC_TRY_COMPILE(
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT),
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
dnl struct sysinfo may have the uptime field or not
|
||||
AC_MSG_CHECKING(for sysinfo.uptime)
|
||||
AC_TRY_COMPILE(
|
||||
[#include <sys/types.h>
|
||||
#include <sys/sysinfo.h>],
|
||||
[ struct sysinfo sinfo;
|
||||
long ut;
|
||||
|
||||
(void)sysinfo(&sinfo);
|
||||
ut = sinfo.uptime;
|
||||
],
|
||||
AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME),
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
dnl sysconf() may exist but not support what we want to use
|
||||
AC_MSG_CHECKING(for sysconf)
|
||||
AC_TRY_COMPILE(
|
||||
|
||||
Reference in New Issue
Block a user