Creates a new session if the calling process is not a process group leader and returns the session ID.