aboutsummaryrefslogtreecommitdiff
path: root/client.c
Commit message (Collapse)AuthorAge
* Add an ACL list for users connecting to the tmux socket. Users may benicm2022-05-30
| | | | | | | | forbidden from attaching, forced to attach read-only, or allowed to attach read-write. A new command, server-access, configures the list. tmux gets the user using getpeereid(3) of the client socket. Users must still configure file system permissions manually. From Dallas Lyons and others.
* Exit on SIGHUP before attach also, GitHub issue 3084.nicm2022-02-28
|
* Replace %% in command lists (by copying them) for template arguments ,nicm2021-08-27
| | | | | this means they can be used with {} as well. Also make argument processing from an existing vector preserve commands. GitHub issue 2858.
* Move the call to setupterm() into the client and have it pass thenicm2021-02-17
| | | | | | results to the server over imsg, means the server does not need to enter ncurses or read terminfo db. Old clients will not work with a new server.
* Do not care about the server socket closing if exiting anyway.nicm2021-02-12
|
* Add a couple of helper functions, and flush imsgs on exit.nicm2021-02-11
|
* Move file handling protocol stuff all into file.c so it can be reusednicm2021-02-11
| | | | more easily.
* Add -N flag to never start server even if command would normally do so,nicm2021-01-17
| | | | GitHub issue 2523.
* With csh, a tmux client gets SIGTERM before SIGCONT when killed withnicm2020-10-30
| | | | | | | "kill %%", so when the client tells the server it got SIGCONT, don't use bits that may already have been freed when it got SIGTERM. Also don't print anything on exit if we get SIGTERM while suspended. Reported by Theo.
* Fix warnings on some platforms with %llx and add a new message to handlenicm2020-09-22
| | | | 64-bit client flags.
* Add a flag to make a client wait for an empty line before exiting innicm2020-06-18
| | | | control mode to avoid stray commands ending up in the shell.
* Instead of a buffer size limit on each pane, set a limit of 300 secondsnicm2020-06-10
| | | | of data for each client in control mode.
* Instead of sending all data to control mode clients as fast as possible,nicm2020-06-01
| | | | | | add a limit of how much data will be sent to the client and try to use it for panes with some degree of fairness. GitHub issue 2217, with George Nachman.
* Pass the stdout file descriptor from the client as well as stdin and usenicm2020-05-26
| | | | | them for control clients directly instead of passing everything via the client.
* imsg.h needs uio.h, pointed out by deraadtnicm2020-05-08
|
* Do not close the stdout file descriptor in control mode as it will benicm2020-04-27
| | | | | needed for printing the exit messages. Fixes a bug when detaching with iTerm2.
* Tidy up the terminal detection and feature code and add named sets ofnicm2020-04-20
| | | | | | | | | | | | | | | | | | | | | terminal features, each of which are defined in one place and map to a builtin set of terminfo(5) capabilities. Features can be specified based on TERM with a new terminal-features option or with the -T flag when running tmux. tmux will also detect a few common terminals from the DA and DSR responses. This is intended to make it easier to configure tmux's use of terminfo(5) even in the presence of outdated ncurses(3) or terminfo(5) databases or for features which do not yet have a terminfo(5) entry. Instead of having to grok terminfo(5) capability names and what they should be set to in the terminal-overrides option, the user can hopefully just give tmux a feature name and let it do the right thing. The terminal-overrides option remains both for backwards compatibility and to allow tweaks of individual capabilities. tmux already did much of this already, this makes it tidier and simpler to configure.
* Make struct cmd local to cmd.c and move it out of tmux.h.nicm2020-04-13
|
* Some unnecessary assignments and unused variables.nicm2020-04-09
|
* Add to rather than replace flags with -c.nicm2020-03-30
|
* When the server socket is given by the user with -S, create it withnicm2020-03-12
| | | | | | umask 177 instead of 117 because it may not be in a safe directory like the default directory in /tmp. The user can chmod it more open after it is created if they want.
* Warn if a message type that is no longer used is received.nicm2020-01-29
|
* Need to include message size in the maximum buffer calculation.nicm2019-12-16
|
* Instead of using large buffers in imsgs, add the data or path onto the end.nicm2019-12-16
|
* Need to check in the error callback also.nicm2019-12-13
|
* Do not spin waiting for exit, instead check in the write callback.nicm2019-12-13
|
* Rewrite the code for reading and writing files. Now, if the client isnicm2019-12-12
| | | | | | | | | not attached, the server process asks it to open the file, similar to how works for stdin, stdout, stderr. This makes special files like /dev/fd/X work (used by some shells). stdin, stdout and stderr and control mode are now just special cases of the same mechanism. This will also make it easier to use for other commands that read files such as source-file.
* Change "lost server" message to "server exited unexpectedly", from Nealnicm2019-07-26
| | | | McBurnett in GitHub issue 1857.
* When system calls indicate an error they return -1, not some arbitraryderaadt2019-06-28
| | | | | | value < 0. errno is only updated in this case. Change all (most?) callers of syscalls to follow this better, and let's see if this strictness helps us in the future.
* Merge cmd_list_parse into cmd-parse.y so it can use the new aliasnicm2019-05-25
| | | | processing code.
* Do not use PWD unless it actually matches the real working directory.nicm2018-11-22
|
* Use <fcntl.h> instead of <sys/file.h> for open() and friends.guenther2018-04-26
| | | | | | | Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
* Prefer PWD for current directory if present in client, from Wei Zhao innicm2018-01-01
| | | | GitHub issue 1183.
* Report better error from server when socket create fails, GitHub issuenicm2017-12-19
| | | | 1201.
* Do not try to put more in command message than will fit when sendingnicm2017-12-18
| | | | (the server will treat as a fatal error). GitHub issue 1200.
* Because ignore SIGCHLD early, letting signal_del restore it doesn't worknicm2017-07-14
| | | | | correctly, so set it explicitly back to default (and the others for good measure).
* Move signal code into proc.c.nicm2017-07-12
|
* Make shell_command a global like other stuff rather than making it annicm2017-07-12
| | | | exception and using callback argument.
* Add support for custom command aliases, this is an array option whichnicm2017-01-24
| | | | | contains items of the form "alias=command". This is consulted when an unknown command is parsed.
* Open /dev/ptm before pledge() and save it to be used for PTMGET laternicm2017-01-23
| | | | | | (this means inlining forkpty()). ok deraadt
* Print error rather than fatal() if tcgetattr() fails, which is much morenicm2017-01-20
| | | | useful to user.
* Revert WIP parts of previous I didn't mean to commit yet.nicm2017-01-16
|
* getopt() has a struct option so just return to using options_entry.nicm2017-01-16
|
* Add -E to detach-client to exec a command to replace the client insteadnicm2017-01-13
| | | | of exiting it, useful if tmux wasn't exec'd itself. From Jenna Magius.
* Remove some dead code in cmd-move-window.c and make a load of localnicm2016-10-03
| | | | functions static.
* I no longer use my SourceForge address so replace it.nicm2016-01-19
|
* Don't print error if none to print.nicm2015-11-25
|
* Shell command from -c doesn't have to be global, pass it as an argument.nicm2015-11-24
|
* Do lock failures slightly better, return a special value so we don'tnicm2015-11-24
| | | | unlink the wrong thing.
* Actually show something (even if it not that helpful) if the servernicm2015-11-24
| | | | | fails to start (for example if it can't create the socket), rather than hanging or showing nothing.