-- We are abusing the hook mechanism to execute arbitrary code at
-- startup.  See __driver__.lua for the details of the algorithm.

p1, e1 = io.open("fifo1", "w")
if p1 == nil then 
   io.stderr:write("(child) open fifo1: " .. e1 .. "\n")
   os.exit(1)
end

p2, e2 = io.open("fifo2", "w")
if p2 == nil then 
   io.stderr:write("(child) open fifo2: " .. e2 .. "\n")
   os.exit(1)
end
p2:close()

p1:write("bar")
p1:flush()
p1:close()
