use setTimeout before spawning processes, in order to allow event handlers to be set up by the client.