mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.5113: timer becomes invalid after fork/exec, :gui gives errors
Problem: Timer becomes invalid after fork/exec, :gui gives errors. (Gabriel Dupras) Solution: Delete the timer befor forking. (closes #10584)
This commit is contained in:
@@ -8247,7 +8247,7 @@ xsmp_close(void)
|
||||
#endif // USE_XSMP
|
||||
|
||||
#if defined(FEAT_RELTIME) || defined(PROTO)
|
||||
# if defined(HAVE_TIMER_CREATE)
|
||||
# if defined(HAVE_TIMER_CREATE) || defined(PROTO)
|
||||
/*
|
||||
* Implement timeout with timer_create() and timer_settime().
|
||||
*/
|
||||
@@ -8331,6 +8331,19 @@ start_timeout(long msec)
|
||||
return &timeout_flag;
|
||||
}
|
||||
|
||||
/*
|
||||
* To be used before fork/exec: delete any created timer.
|
||||
*/
|
||||
void
|
||||
delete_timer(void)
|
||||
{
|
||||
if (timer_created)
|
||||
{
|
||||
timer_delete(timer_id);
|
||||
timer_created = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
# else
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user