working on rand test

This commit is contained in:
Axel Kittenberger 2010-11-18 08:58:01 +00:00
parent e0e7a2a705
commit e9e9e81fbf

View File

@ -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)