Added support for detached processes.