mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Use Lua auto buffers when possible
This commit is contained in:
parent
13ee75150c
commit
da6d610056
8 changed files with 204 additions and 101 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue