summaryrefslogtreecommitdiff
path: root/tests/test-subprocess.lua
blob: 06f7757c8dcac5a15a938f3b1cea554bd2f527b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
sp = require 'luxio.subprocess'

proc = sp.spawn_simple {
   "ls", "/",
   stdout = sp.PIPE
}

listing = proc.stdout:read("*a")
proc.stdout:close()

print(proc:wait())

print(listing)