If you don't call setsid(), you might endup with some control terminal attached to your process, and the process will possibly receive some signals, the default action for most signals are to terminate the process! It's okay for a process group to go without a leader. For example, the process who has forked child processes has terminated, the child processes can still live.
This post has been archived. It cannot be replied.