summaryrefslogtreecommitdiff
path: root/tex/context/base/l-io.lua
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2012-11-26 13:31:00 +0100
committerHans Hagen <pragma@wxs.nl>2012-11-26 13:31:00 +0100
commit82a9d3d7e785ad838f8c6d0e5d779947be0c359f (patch)
tree33ca4e34e44b085340a44436441e42798468edcc /tex/context/base/l-io.lua
parenta57ab2d223a7bcc8e9ae57e148c30ac6e91fafdb (diff)
downloadcontext-82a9d3d7e785ad838f8c6d0e5d779947be0c359f.tar.gz
beta 2012.11.26 13:31
Diffstat (limited to 'tex/context/base/l-io.lua')
-rw-r--r--tex/context/base/l-io.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/tex/context/base/l-io.lua b/tex/context/base/l-io.lua
index 3456001b7..ec628b5e0 100644
--- a/tex/context/base/l-io.lua
+++ b/tex/context/base/l-io.lua
@@ -336,3 +336,21 @@ end
if not io.i_limiter then function io.i_limiter() end end -- dummy so we can test safely
if not io.o_limiter then function io.o_limiter() end end -- dummy so we can test safely
+
+-- This works quite ok:
+--
+-- function io.piped(command,writer)
+-- local pipe = io.popen(command)
+-- -- for line in pipe:lines() do
+-- -- print(line)
+-- -- end
+-- while true do
+-- local line = pipe:read(1)
+-- if not line then
+-- break
+-- elseif line ~= "\n" then
+-- writer(line)
+-- end
+-- end
+-- return pipe:close() -- ok, status, (error)code
+-- end