1
0
mirror of https://github.com/lxsang/antd-lua-plugin synced 2024-12-27 09:58:21 +01:00
antd-lua-plugin/example-app/proc.lua
2018-09-19 15:08:49 +02:00

17 lines
289 B
Lua

std.html()
local pid = unix.fork()
if pid == -1 then
echo("Fail to fork")
elseif pid > 0 then
for i = 1,10 do
print("parent "..i)
end
unix.waitpid(pid)
print("Child finish")
else
for i = 1,20 do
print("child "..i)
end
end
print "reach for both"