mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Update redbean lua example code
This commit is contained in:
parent
451e3f73d9
commit
72e9be5c20
7 changed files with 56 additions and 51 deletions
|
@ -8,14 +8,14 @@ function main()
|
|||
cmd = 'ls'
|
||||
end
|
||||
syscall = 'commandv'
|
||||
ls, errno = unix.commandv(cmd)
|
||||
ls = assert(unix.commandv(cmd))
|
||||
if ls then
|
||||
syscall = 'pipe'
|
||||
reader, writer, errno = unix.pipe()
|
||||
if reader then
|
||||
oldint = unix.sigaction(unix.SIGINT, unix.SIG_IGN)
|
||||
oldquit = unix.sigaction(unix.SIGQUIT, unix.SIG_IGN)
|
||||
oldmask = unix.sigprocmask(unix.SIG_BLOCK, (1 << (unix.SIGCHLD - 1)))
|
||||
-- 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, (1 << (unix.SIGCHLD - 1))))
|
||||
syscall = 'fork'
|
||||
child, errno = unix.fork()
|
||||
if child then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue