diff options
author | ubq323 <ubq323@ubq323.website> | 2024-11-01 01:13:57 +0000 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-11-01 01:14:42 +0000 |
commit | ef4207a7f6d85f2a33fa1889299dedc2270df856 (patch) | |
tree | 22d4c12ce3ed9cfb9e1ba103b8be611070bb3c82 | |
parent | 456fce748b6a9e4e41a5508621a002ceb3952416 (diff) |
posix bug
-rw-r--r-- | init.lua | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4,13 +4,14 @@ local prose = require'garkup.prose' function empipe(prog, input) local posix = require'posix' + local unistd = posix.unistd or require'posix.unistd' local pipe = assert(posix.popen_pipeline({ function() io.write(input) end, prog }, "r")) local output = "" repeat - local next = assert(posix.unistd.read(pipe.fd, 8192)) + local next = assert(unistd.read(pipe.fd, 8192)) output = output .. next until #next == 0 assert(posix.pclose(pipe)) |