unixy extension: ps => kill for better portability
This commit is contained in:
parent
d25a33a160
commit
4c72581493
1 changed files with 1 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ unixy = {
|
||||||
for i = #unixy.jobs, 1, -1 do
|
for i = #unixy.jobs, 1, -1 do
|
||||||
local job = unixy.jobs[i]
|
local job = unixy.jobs[i]
|
||||||
-- 'kill -0' doesn't kill the process, it just checks if it exists.
|
-- 'kill -0' doesn't kill the process, it just checks if it exists.
|
||||||
local retcode = os.execute("ps -p " .. job.pid .. " > /dev/null")
|
local stdout, retcode = os.execute("kill -0 " .. job.pid .. " > /dev/null")
|
||||||
if retcode ~= 0 then
|
if retcode ~= 0 then
|
||||||
-- Process finished! Read stdout & stderr
|
-- Process finished! Read stdout & stderr
|
||||||
local f = io.open(job.stdout_file, "r")
|
local f = io.open(job.stdout_file, "r")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue