This is a race... process exit can exit the event loop before spawn gets called in some cases