Core Library0.xAPI reference

Choose documentation 1

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

MoreLess about this notice

class libtmux-lua

OwnedServer

A tmux server that libtmux.Runtime:start_server() started and owns.

Source and package
Qualified name
libtmux.OwnedServer
Module
libtmux
Package
libtmux
Source
lua/libtmux/_internal/server.lua
class libtmux.OwnedServer

Description

server is a libtmux.Server for it, the same handle libtmux.Runtime:connect() returns, and socket_path is its socket, for a second handle. stop() ends the daemon and removes its directory. The runtime stops every owned server that is still running when it ends, whether the body returned, failed or was cancelled, so a program that forgets stop() leaves nothing behind. A stop the runtime ran for you that finds a leaked_server or stop_failed fails the run with cleanup_failed.

libtmux.Server:close() on server still only releases the handle.

Members3 members

  • server: libtmux.Server attribute A handle to one running tmux server, reached through a connected runtime.
  • stop method Runs kill-server, then connects to the socket until nothing listens, for at most timeout milliseconds, and removes the directory. It resolves to true once the daemon is gone and the directory removed, and again on later calls. A daemon that still answers fails with stop_failed, keeps the directory and names it in directory; calling again tries once more. When the program left another tmux server under the directory, stop() stops it too and fails with leaked_server, naming each socket in sockets.
  • socket_path: string attribute The private socket.

Guides

task material

Pages that discuss OwnedServer.

Esc
Search in

Type to search.

Reference previewOpen reference