summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/client.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Accidentally turned off pledge, turn it back on.nicm2015-11-151-3/+3
|
* Push stdout and stderr to clients more aggressively, and add an event tonicm2015-11-141-3/+3
| | | | continue if the send fails.
* Don't shift version out of peerid, it is needed later.nicm2015-10-311-2/+2
|
* Because pledge(2) does not allow us to pass directory file descriptorsnicm2015-10-311-3/+5
| | | | | | | | | around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
* Like options, move the environ struct into environ.c.nicm2015-10-281-2/+2
|
* Move struct options into options.c.nicm2015-10-271-4/+4
|
* Break the common process set up, event loop and imsg dispatch codenicm2015-10-271-302/+209
| | | | | between server and client out into a separate internal API. This will make it easier to add another process.
* Pass current directory as a string rather than a file descriptor becausenicm2015-10-181-10/+10
| | | | pledge doesn't let us pass directory file descriptors.
* Add pledge "stdio unix sendfd proc exec tty" to tmux client process,nicm2015-10-171-14/+41
| | | | "sendfd" is dropped after first message from the server.
* Userspace doesn't need to use SUN_LEN(): connect() and bind() must acceptguenther2015-10-111-2/+2
| | | | | | sizeof(struct sockaddr_un), so do the simple, portable thing ok beck@ deraadt@
* Don't leak fd and path on failure.nicm2015-09-241-2/+6
|
* No need to keep global options around for client which doesn't use them.nicm2015-09-091-1/+5
|
* Login shell can be a client flag, and move the exec code into client.c.nicm2015-08-301-18/+51
|
* Event base does not need to be global.nicm2015-08-301-6/+6
|
* Ignore environment variables that are too long to send to the server.nicm2015-07-131-3/+7
|
* Add a format for client PID (client_pid) and server PID (pid). Diff fornicm2015-06-141-3/+7
| | | | client_pid from Thomas Adam.
* Move the nested check from client to server and compare the client ttynicm2015-06-041-16/+2
| | | | | name to all the pane pty names instead of comparing socket paths. This means that "new -d" will work without unsetting $TMUX.
* Set up signal handler earlier so that we don't get zombies, reported bynicm2015-04-241-4/+4
| | | | sobrado@.
* Simplify error messages when socket connect fails, suggested by "Karthik K".nicm2015-04-211-3/+8
|
* Fix some format specifier nits, from Ben Boeckel.nicm2015-03-311-4/+4
|
* Tidy up some includes.nicm2014-10-201-1/+2
|
* Call waitpid on SIGCHLD even if client not attached, it is possible (onnicm2014-10-011-9/+5
| | | | | very slow platforms) for the first daemon() child to still be running when client_attached is set so we end up with a zombie. From J Raynor.
* Various minor style and spacing nits.nicm2014-09-011-3/+3
|
* lockf is entirely useless and it was a mistake to change to it, go backnicm2014-07-211-13/+37
| | | | | to using flock which actually works sensibly. Also always retry the lock to fix a potential race, and add some extra logging.
* An EOF is a good reason to close a connection.krw2014-07-131-2/+2
| | | | ok nicm@
* fcntl.h is still needed here.nicm2014-04-291-1/+2
|
* Remove some unnecessary includes and fix a typo.nicm2014-04-171-3/+1
|
* Fix a memory/fd leak reported by Tiago Cunha.nicm2014-01-091-3/+8
|
* Three small changes from Tiago Cunha:nicm2014-01-091-2/+3
| | | | | | - Check for truncation when copying path. - Don't need to use a temporary buffer in screen_set_title. - Include strerror in output when connecting to server fails.
* from nicm: : handle msgbuf_write() returning EAGAINbenno2013-11-131-2/+2
|
* Use format_get_command() and some spacing tweaks.nicm2013-10-101-1/+2
|
* We accidentally haven't been using $TMUX to work out the session for anicm2013-10-101-5/+1
| | | | | | while and in fact it is less useful that using the client ttyname. So don't bother and don't pass it from the client. If we need it in future it is in c->environ.
* Show session name in detached message. Requested by somebody a fewnicm2013-10-101-4/+19
| | | | months ago who didn't bother testing it. But it works for me anyway.
* Don't look at string[length - 1] if length == 0.nicm2013-10-101-3/+3
|
* Alter how tmux handles the working directory to internally use filenicm2013-10-101-34/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | descriptors rather than strings. - Each session still has a current working directory. - New sessions still get their working directory from the client that created them or its attached session if any. - New windows are created by default in the session working directory. - The -c flag to new, neww, splitw allows the working directory to be overridden. - The -c flag to attach let's the session working directory be changed. - The default-path option has been removed. To get the equivalent to default-path '.', do: bind c neww -c $PWD To get the equivalent of default-path '~', do: bind c neww -c ~ This also changes the client identify protocol to be a set of messages rather than one as well as some other changes that should make it easier to make backwards-compatible protocol changes in future.
* Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048.nicm2013-10-101-16/+50
|
* Instead of fixed size buffers for some messages, send only the stringnicm2013-10-101-36/+32
| | | | length.
* Merge IDENTIFY_* flags with CLIENT_* flags.nicm2013-10-101-10/+8
|
* Remove CMD_SENDENVIRON.nicm2013-10-101-6/+3
|
* Use lockf which is more portable than flock, from Dagobert Michelsen.nicm2013-04-221-3/+3
|
* We ignore SIGWINCH until ready, so send a MSG_RESIZE immediately whennicm2013-03-251-1/+2
| | | | becoming ready.
* Rename session idx to session id throughout and add $ prefix to targetsnicm2013-03-251-2/+2
| | | | to use it, extended from a diff from George Nachman.
* Send DSC 1000p at the beginning of a -CC client's lifetime and ST andnicm2013-03-251-2/+10
| | | | the end, from George Nachman.
* Add a command queue to standardize and simplify commands that call othernicm2013-03-241-2/+3
| | | | | | | | | | | | | | | | | | | | | | commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
* No more lint means no more ARGSUSED.nicm2013-03-221-5/+1
|
* If stdin in the client is enable immediately, tmux will eat anythingnicm2012-09-031-2/+7
| | | | | | | sent to stdin before it is needed, which can be inconvenient (eg pasting commands). Instead, start with stdin disabled and reuse MSG_STDIN from server->client to mean that stdin should be enabled. Based on a diff from Chris Johnsen.
* Change a log to fprintf that was missed last time around, from Tiago Cunha.nicm2012-08-271-2/+2
|
* xfree is not particularly helpful, remove it. From Thomas Adam.nicm2012-07-101-2/+2
|
* Actually write all the data to stdout/stderr.nicm2012-06-181-3/+22
|
* Add a skeleton mode to tmux (called "control mode") that let's tmuxnicm2012-06-181-2/+27
| | | | | | | commands be sent and output received on stdout. This can be used to integrate with other terminal emulators and should allow some other things to be made simpler later. More to come so doesn't do much yet and deliberately not documented.