add detached process support