A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
10
Task/Fork/Lua/fork.lua
Normal file
10
Task/Fork/Lua/fork.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
local posix = require 'posix'
|
||||
|
||||
local pid = posix.fork()
|
||||
if pid == 0 then
|
||||
print("child process")
|
||||
elseif pid > 0 then
|
||||
print("parent process")
|
||||
else
|
||||
error("unable to fork")
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue