mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-06 00:30:46 +00:00
working on rand test
This commit is contained in:
parent
e0e7a2a705
commit
e9e9e81fbf
@ -37,9 +37,25 @@ if lpid == 0 then
|
||||
os.exit(-1);
|
||||
end
|
||||
|
||||
|
||||
-- cleans the targets
|
||||
os.execute("rm -rf src/*")
|
||||
os.execute("rm -rf trg/*")
|
||||
posix.sleep(1)
|
||||
|
||||
|
||||
while true do
|
||||
-- throw a die what to do
|
||||
local acn = math.random(2)
|
||||
if acn == 1 then
|
||||
-- creates a directory
|
||||
print(string.char(96))
|
||||
end
|
||||
if acn == 2 then
|
||||
-- creates a files
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- kills the lsyncd daemon
|
||||
posix.kill(lpid)
|
||||
local _, exitmsg, exitcode = posix.wait(lpid)
|
||||
|
Loading…
Reference in New Issue
Block a user