aboutsummaryrefslogtreecommitdiff
path: root/client.c
Commit message (Collapse)AuthorAge
...
| * Pass a set of flags into client_init rather than just a start_serverNicholas Marriott2009-07-22
| | | | | | | | variable. Only one flag now but more to come later.
| * Remove some dead assignments, found by sthen with clang.Nicholas Marriott2009-06-25
| |
| * Call setproctitle earlier in the client, and include the socket name. Makes itNicholas Marriott2009-06-05
| | | | | | | | easier to match client to server in ps/pgrep when using several servers.
| * Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott2009-06-01
| | | | | | | terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti
* Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-codeNicholas Marriott2013-03-11
|\
| * Rename session idx to session id throughout and add $ prefix to targets to useNicholas Marriott2013-03-07
| | | | | | | | it, extended from a diff from George Nachman.
* | We ignore SIGWINCH until ready, so send a MSG_RESIZE immediately when becomingNicholas Marriott2013-03-11
|/ | | | ready.
* Send DSC 1000p at the beginning of a -CC client's lifetime and ST and the end,Nicholas Marriott2013-03-04
| | | | from George Nachman..
* Add a command queue to standardize and simplify commands that call otherNicholas Marriott2013-02-23
| | | | | | | | | | | | | | | | | | | | 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.Nicholas Marriott2013-02-17
|
* If stdin in the client is enable immediately, tmux will eat anythingNicholas Marriott2012-09-04
| | | | | | | 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.
* Sync OpenBSD patchset 1168:Tiago Cunha2012-08-31
| | | | | Change a log to fprintf that was missed last time around, from Tiago Cunha.
* Sync OpenBSD patchset 1150:Tiago Cunha2012-07-11
| | | | | xfree is not particularly helpful, remove it. From Thomas Adam.
* More ifdef goo is needed due to NOKERNINFO.Tiago Cunha2012-06-18
|
* Sync OpenBSD patchset 1139:Tiago Cunha2012-06-18
| | | | | Actually write all the data to stdout/stderr.
* Sync OpenBSD patchset 1138:Tiago Cunha2012-06-18
| | | | | | | | | Add a skeleton mode to tmux (called "control mode") that let's tmux 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.
* Sync OpenBSD patchset 1123:Tiago Cunha2012-05-30
| | | | | Simplify logging and just fprintf(stderr, ...) for early errors.
* Sync OpenBSD patchset 1114:Tiago Cunha2012-05-22
| | | | | | | | | | | | | Instead of passing stdin/stdout/stderr file descriptors over imsg and handling them in the server, handle them in the client and pass buffers over imsg. This is much tidier for some upcoming changes and the performance hit isn't critical. The tty fd is still passed to the server as before. This bumps the tmux protocol version so new clients and old servers are incompatible.
* Sync OpenBSD patchset 1101:Tiago Cunha2012-04-24
| | | | | Add missing prototype.
* Sync OpenBSD patchset 1100:Tiago Cunha2012-04-24
| | | | | Use an enum for client exit reasons, from George Nachman.
* Sync OpenBSD patchset 1080:Tiago Cunha2012-03-29
| | | | | Add sys/file.h.
* Sync OpenBSD patchset 1071:Tiago Cunha2012-03-29
| | | | | | Move MSG_IDENTIFY to the last sent by the client, this will be needed by control clients and irrelevant for others.
* Sync OpenBSD patchset 1043:Tiago Cunha2012-03-18
| | | | | | | Use a lock file and flock() to serialize server start, avoids problems when running a bunch of tmux from cron at the same time. Based on a diff from Tim Ruehsen.
* Expand the Id keyword. Tiago Cunha2011-07-09
|
* Sync OpenBSD patchset 863:Tiago Cunha2011-03-19
| | | | | | Add a -P option to detach to HUP the client's parent process (usually causing it to exit as well).
* Sync OpenBSD patchset 834:Tiago Cunha2011-01-21
| | | | | | | Move all calls to fcntl(...O_NONBLOCK) into a function and clear the flag on the stdio file descriptors before closing them (fixes things like "tmux ls && cat").
* Put setproctitle back under HAVE_SETPROCTITLE.Nicholas Marriott2010-10-24
|
* Sync OpenBSD patchset 777:Tiago Cunha2010-10-24
| | | | | | Merge the before and after attach client code into one in client.c (instead of two in tmux.c and client.c).
* Sync OpenBSD patchset 775:Tiago Cunha2010-10-24
| | | | | | Trying to set FD_CLOEXEC on every fd is a lost cause, just use closefrom() before exec.
* Sync OpenBSD patchset 753:Tiago Cunha2010-08-29
| | | | | | Can't call event_del() without event_set() first - so call event_set() when setting up the client.
* Sync OpenBSD patchset 752:Tiago Cunha2010-08-29
| | | | | | MSG_EXIT can now have a return code in the message, so check for that size as well. Stops the client fatal()ing on exit.
* Sync OpenBSD patchset 731:Tiago Cunha2010-07-02
| | | | | | | | | | Send all three of stdin, stdout, stderr from the client to the server, so that commands can directly make use of them. This means that load-buffer and save-buffer can have "-" as the file to read from stdin or write to stdout. This is a protocol version bump so the tmux server will need to be restarted after upgrade (or an older client used).
* Sync OpenBSD patchset 716:Tiago Cunha2010-06-06
| | | | | | | | | | | | | | | | | | | | Fix problems with window sizing seen by Raghavendra D Prabhu when starting tmux from .xinitrc. One of the very few things the server relies on the client for now is to pass through a message on SIGWINCH, but there is a condition where potentially a SIGWINCH may be lost during the transition from unattached (main.c) to attached (client.c). So trigger a size change immediately after the client installs its SIGWINCH handler. Also, when the terminal is resized, reset the scroll region and cursor position. Previously, we were clearing our saved idea of these, but in fact some terminals do not reset them on resize, so this caused problems during redraw. While here make a resize to the same size not cause a redraw and rename the tmux.out output log file to include the tmux PID.
* Sync OpenBSD patchset 713:Tiago Cunha2010-06-06
| | | | | | This ioctl(TIOCGWINSZ) call is no longer necessary, the result is never used and the server now does it later on the tty fd directly.
* Sync OpenBSD patchset 698:Tiago Cunha2010-05-14
| | | | | | | | | Catch SIGHUP and terminate if running as a client. This prevents clients from being left hanging around when, for example, a SSH session is disconnected. ok nicm@
* Sync OpenBSD patchset 696:Tiago Cunha2010-05-14
| | | | | | | Make signal handler setup/teardown two common functions instead of six, and reset SIGCHLD after fork to fix problems with some shells. From Romain Francoise.
* Sync OpenBSD patchset 581:Tiago Cunha2009-12-04
| | | | | | | Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
* Sync OpenBSD patchset 567:Tiago Cunha2009-11-28
| | | | | | Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to the rest to reduce lint output.
* Sync OpenBSD patchset 536:Tiago Cunha2009-11-14
| | | | | imsg_read returns ssize_t not int, pointed out by lint via deraadt.
* Sync OpenBSD patchset 521:Tiago Cunha2009-11-10
| | | | | | Don't return 1 unless there was actually a problem (signal/lost server) rather than for all events (normal exit/detach/etc).
* Sync OpenBSD patchset 501:Tiago Cunha2009-11-08
| | | | | Move some common code into a function.
* Sync OpenBSD patchset 491:Tiago Cunha2009-11-08
| | | | | | | | | | | | Initial changes to move tmux to libevent. This moves the client-side loops are pretty much fully over to event-based only (tmux.c and client.c) but server-side (server.c and friends) treats libevent as a sort of clever poll, waking up after every event to run various things. Moving the server stuff over to bufferevents and timers and so on will come later.
* Sync OpenBSD patchset 478:Tiago Cunha2009-11-02
| | | | | Leftover unused variable :-/.
* Sync OpenBSD patchset 477:Tiago Cunha2009-11-02
| | | | | | There isn't much point in doing lstat before connect so instead just do connect and handle ENOENT from it which is a little tidier.
* Sync OpenBSD patchset 466:Tiago Cunha2009-10-28
| | | | | | Clear signal flags /before/ taking action and continue afterwards to reduce chance of dropping signals. Pointed out by deraadt@.
* Fix CVS keyword.Tiago Cunha2009-10-23
|
* Sync OpenBSD patchset 435:Tiago Cunha2009-10-23
| | | | | Tidy identify message send into a separate function.
* Sync OpenBSD patchset 433:Tiago Cunha2009-10-23
| | | | | | Client tidying: get rid of client_ctx struct in favour of two variables in client.c, and move the functions in client-fn.c into other files.
* Fix CVS keyword.Tiago Cunha2009-10-15
|
* Sync OpenBSD patchset 406:Tiago Cunha2009-10-15
| | | | | | | | Do this in a better way - print messages when exiting with nonzero. Also remove the login shell information from server-info, only the client should care about it.