diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2021-12-13 13:27:30 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2021-12-13 13:27:30 +0100 |
| commit | b69830edda38ad57457eb0e0c55e63326930e6db (patch) | |
| tree | 74a4cd68efb400092dc735da1845dff2d7203884 /init.lua | |
| parent | 14b2a777085b60f2b0fba4cfc8407d9228758f44 (diff) | |
| download | vis-lspc-b69830edda38ad57457eb0e0c55e63326930e6db.tar.gz vis-lspc-b69830edda38ad57457eb0e0c55e63326930e6db.zip | |
use capture_cmd where possible
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -156,13 +156,7 @@ do vis_proc_file:close() else -- fallback if /proc/self/stat - local p = io.popen('sh -c "echo $PPID"') - local out = p:read('*a') - local success, _, status = p:close() - - if not success then - lspc_err('sh failed with exit code: ' .. status) - end + local out = capture_cmd('sh -c "echo $PPID"') vis_pid = tonumber(out) end end |
