Added detaching a child process to avoid crash when exiting during debugging.