0
0
mirror of https://github.com/vim/vim.git synced 2025-09-24 03:44:06 -04: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:
Bram Moolenaar
2021-03-10 21:26:37 +01:00
parent c23555de34
commit f52f0606ed
8 changed files with 147 additions and 16 deletions

View File

@@ -970,6 +970,8 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
ui_delay_for_testing = val;
else if (STRCMP(name, (char_u *)"term_props") == 0)
reset_term_props_on_termresponse = val;
else if (STRCMP(name, (char_u *)"uptime") == 0)
override_sysinfo_uptime = val;
else if (STRCMP(name, (char_u *)"ALL") == 0)
{
disable_char_avail_for_testing = FALSE;
@@ -979,6 +981,7 @@ f_test_override(typval_T *argvars, typval_T *rettv UNUSED)
no_query_mouse_for_testing = FALSE;
ui_delay_for_testing = 0;
reset_term_props_on_termresponse = FALSE;
override_sysinfo_uptime = -1;
if (save_starting >= 0)
{
starting = save_starting;