Server.NewSessionConnection
NewSessionConnection creates a session and an owned connection on tmux 3.7 or newer. With a live daemon, its creating control client is the first lane. Cold startup first creates a detached session, then pins and attaches to its qualified socket. An attachment failure can return that partial session. Cleanup closes owned clients; tmux policy decides whether the session lives. KillExisting is rejected because removal cannot be rolled back after a later connection failure.
Source and package
- Qualified name
-
tmux.Server. New Session Connection - Package
- tmux
- Declared in
Server- Distribution
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/connection.go
- func (s Server) NewSessionConnection( ctx context
.Context , request NewSession , options ConnectionRequest Options , ) (Session, *Connection, error) -
- Parameters
tmux command#
The tmux commands behind NewSessionConnection.
new-session list-sessions (a name is given) tmux C API#
The C declarations in tmux that implement these commands.
Each path starts at a function a command runs, which is degree 1. The degree counts steps from there along the path, and each step is a call or a reference: degree 2 is reached from that function, degree 3 from the next, and so on.
Create a session and its first pane
- 1
cmd_new_session_exec - calls → 2
spawn_window - calls → 3
spawn_pane - calls → 4
window_add_pane - calls → 5
window_pane_create