summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_system.lua
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/lua/vim/_system.lua')
-rw-r--r--runtime/lua/vim/_system.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/runtime/lua/vim/_system.lua b/runtime/lua/vim/_system.lua
index e40229de63..23a32fbd49 100644
--- a/runtime/lua/vim/_system.lua
+++ b/runtime/lua/vim/_system.lua
@@ -79,22 +79,19 @@ function SystemObj:_timeout(signal)
self:kill(signal or SIG.TERM)
end
--- Use max 32-bit signed int value to avoid overflow on 32-bit systems. #31633
-local MAX_TIMEOUT = 2 ^ 31 - 1
-
--- @param timeout? integer
--- @return vim.SystemCompleted
function SystemObj:wait(timeout)
local state = self._state
- local done = vim.wait(timeout or state.timeout or MAX_TIMEOUT, function()
+ local done = vim.wait(timeout or state.timeout or vim._maxint, function()
return state.result ~= nil
end, nil, true)
if not done then
-- Send sigkill since this cannot be caught
self:_timeout(SIG.KILL)
- vim.wait(timeout or state.timeout or MAX_TIMEOUT, function()
+ vim.wait(timeout or state.timeout or vim._maxint, function()
return state.result ~= nil
end, nil, true)
end