OwnedServer
A tmux server that libtmux.Runtime:start_server() started and owns.
Source and package
- Qualified name
-
libtmux.Owned Server - Module
- libtmux
- Package
- libtmux
- Source
- lua/libtmux/_internal/server.lua
-
Description
serveris alibtmux.Serverfor it, the same handlelibtmux.Runtime:connect()returns, andsocket_pathis 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 forgetsstop()leaves nothing behind. A stop the runtime ran for you that finds aleaked_serverorstop_failedfails the run withcleanup_failed.libtmux.Server:close()onserverstill 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 mosttimeoutmilliseconds, and removes the directory. It resolves totrueonce the daemon is gone and the directory removed, and again on later calls. A daemon that still answers fails withstop_failed, keeps the directory and names it indirectory; calling again tries once more. When the program left another tmux server under the directory,stop()stops it too and fails withleaked_server, naming each socket insockets. - socket_path: string attribute The private socket.
Guides
task materialPages that discuss OwnedServer.