diff options
-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)) |