// CreateSession creates a new Session, with the ThreadGroup as the leader.
//
// EPERM may be returned if either the given ThreadGroup is already a Session
// leader, or a ProcessGroup already exists for the ThreadGroup's ID.
CreateSession creates a new Session, with the ThreadGroup as the leader.

EPERM may be returned if either the given ThreadGroup is already a Session
leader, or a ProcessGroup already exists for the ThreadGroup's ID.
// CreateSession creates a new Session with the ThreadGroup as the leader . // // EPERM may be returned if either the given ThreadGroup is already a Session // leader or a ProcessGroup already exists for the ThreadGroup ' s ID .
func (tg *ThreadGroup) CreateSession() error {
	tg.pidns.owner.mu.Lock()
	defer tg.pidns.owner.mu.Unlock()
	tg.signalHandlers.mu.Lock()
	defer tg.signalHandlers.mu.Unlock()
	return tg.createSession()
}
func ( tg * ThreadGroup ) CreateSession ( ) error { tg . pidns . owner . mu . Lock ( ) defer tg . pidns . owner . mu . Unlock ( ) tg . signalHandlers . mu . Lock ( ) defer tg . signalHandlers . mu . Unlock ( ) return tg . createSession ( ) }
CreateSession creates a new Session, with the ThreadGroup as the leader.
CreateSession creates a new Session with the ThreadGroup as the leader .