Mercurial > vim
comparison src/configure.ac @ 24089:cdeec1389c8c v8.2.2586
patch 8.2.2586: process id may be invalid
Commit: https://github.com/vim/vim/commit/f52f0606ed9ea19bcfc3a8343af9958f2d99eaf7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 10 21:26:37 2021 +0100
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 10 Mar 2021 21:30:03 +0100 |
parents | a77ea73f4db5 |
children | c5cb45fc82d3 |
comparison
equal
deleted
inserted
replaced
24088:03ee5ad8e15a | 24089:cdeec1389c8c |
---|---|
4093 sinfo.mem_unit = 1; | 4093 sinfo.mem_unit = 1; |
4094 ], | 4094 ], |
4095 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT), | 4095 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_MEM_UNIT), |
4096 AC_MSG_RESULT(no)) | 4096 AC_MSG_RESULT(no)) |
4097 | 4097 |
4098 dnl struct sysinfo may have the uptime field or not | |
4099 AC_MSG_CHECKING(for sysinfo.uptime) | |
4100 AC_TRY_COMPILE( | |
4101 [#include <sys/types.h> | |
4102 #include <sys/sysinfo.h>], | |
4103 [ struct sysinfo sinfo; | |
4104 long ut; | |
4105 | |
4106 (void)sysinfo(&sinfo); | |
4107 ut = sinfo.uptime; | |
4108 ], | |
4109 AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SYSINFO_UPTIME), | |
4110 AC_MSG_RESULT(no)) | |
4111 | |
4098 dnl sysconf() may exist but not support what we want to use | 4112 dnl sysconf() may exist but not support what we want to use |
4099 AC_MSG_CHECKING(for sysconf) | 4113 AC_MSG_CHECKING(for sysconf) |
4100 AC_TRY_COMPILE( | 4114 AC_TRY_COMPILE( |
4101 [#include <unistd.h>], | 4115 [#include <unistd.h>], |
4102 [ (void)sysconf(_SC_PAGESIZE); | 4116 [ (void)sysconf(_SC_PAGESIZE); |