Use Lua auto buffers when possible

This commit is contained in:
Justine Tunney 2022-05-29 14:47:14 -07:00
parent 13ee75150c
commit da6d610056
8 changed files with 204 additions and 101 deletions

View file

@ -7,14 +7,11 @@ function main()
else
cmd = 'ls'
end
syscall = 'commandv'
ls = assert(unix.commandv(cmd))
syscall = 'pipe'
reader, writer = assert(unix.pipe(unix.O_CLOEXEC))
oldint = assert(unix.sigaction(unix.SIGINT, unix.SIG_IGN))
oldquit = assert(unix.sigaction(unix.SIGQUIT, unix.SIG_IGN))
oldmask = assert(unix.sigprocmask(unix.SIG_BLOCK, unix.Sigset(unix.SIGCHLD)))
syscall = 'fork'
child = assert(unix.fork())
if child == 0 then
unix.close(0)