summaryrefslogtreecommitdiffstats
path: root/client.c
AgeCommit message (Collapse)Author
2018-04-26Use <fcntl.h> instead of <sys/file.h> for open() and friends.guenther
Delete a bunch of unnecessary #includes and sort to match style(9) while doing the above cleanup. ok deraadt@ krw@
2018-01-01Prefer PWD for current directory if present in client, from Wei Zhao innicm
GitHub issue 1183.
2017-12-19Report better error from server when socket create fails, GitHub issuenicm
1201.
2017-12-18Do not try to put more in command message than will fit when sendingnicm
(the server will treat as a fatal error). GitHub issue 1200.
2017-07-14Because ignore SIGCHLD early, letting signal_del restore it doesn't worknicm
correctly, so set it explicitly back to default (and the others for good measure).
2017-07-12Move signal code into proc.c.nicm
2017-07-12Make shell_command a global like other stuff rather than making it annicm
exception and using callback argument.
2017-01-24Add support for custom command aliases, this is an array option whichnicm
contains items of the form "alias=command". This is consulted when an unknown command is parsed.
2017-01-23Open /dev/ptm before pledge() and save it to be used for PTMGET laternicm
(this means inlining forkpty()). ok deraadt
2017-01-20Print error rather than fatal() if tcgetattr() fails, which is much morenicm
useful to user.
2017-01-16Revert WIP parts of previous I didn't mean to commit yet.nicm
2017-01-16getopt() has a struct option so just return to using options_entry.nicm
2017-01-13Add -E to detach-client to exec a command to replace the client insteadnicm
of exiting it, useful if tmux wasn't exec'd itself. From Jenna Magius.
2016-10-03Remove some dead code in cmd-move-window.c and make a load of localnicm
functions static.
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-11-25Don't print error if none to print.nicm
2015-11-24Shell command from -c doesn't have to be global, pass it as an argument.nicm
2015-11-24Do lock failures slightly better, return a special value so we don'tnicm
unlink the wrong thing.
2015-11-24Actually show something (even if it not that helpful) if the servernicm
fails to start (for example if it can't create the socket), rather than hanging or showing nothing.
2015-11-24Tidy the code that works out the socket path, and just use the full pathnicm
in the global socket_path rather than copying it.
2015-11-24Switch a fprintf to a fatal, and wrap some long lines.nicm
2015-11-18Use __unused rather than rolling our own.nicm
2015-11-15Accidentally turned off pledge, turn it back on.nicm
2015-11-14Push stdout and stderr to clients more aggressively, and add an event tonicm
continue if the send fails.
2015-10-31Don't shift version out of peerid, it is needed later.nicm
2015-10-31Because pledge(2) does not allow us to pass directory file descriptorsnicm
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).
2015-10-28Like options, move the environ struct into environ.c.nicm
2015-10-27Move struct options into options.c.nicm
2015-10-27Break the common process set up, event loop and imsg dispatch codenicm
between server and client out into a separate internal API. This will make it easier to add another process.
2015-10-18Pass current directory as a string rather than a file descriptor becausenicm
pledge doesn't let us pass directory file descriptors.
2015-10-17Add pledge "stdio unix sendfd proc exec tty" to tmux client process,nicm
"sendfd" is dropped after first message from the server.
2015-10-11Userspace doesn't need to use SUN_LEN(): connect() and bind() must acceptguenther
sizeof(struct sockaddr_un), so do the simple, portable thing ok beck@ deraadt@
2015-09-24Don't leak fd and path on failure.nicm
2015-09-09No need to keep global options around for client which doesn't use them.nicm
2015-08-30Login shell can be a client flag, and move the exec code into client.c.nicm
2015-08-30Event base does not need to be global.nicm
2015-07-13Ignore environment variables that are too long to send to the server.nicm
2015-06-14Add a format for client PID (client_pid) and server PID (pid). Diff fornicm
client_pid from Thomas Adam.
2015-06-04Move the nested check from client to server and compare the client ttynicm
name to all the pane pty names instead of comparing socket paths. This means that "new -d" will work without unsetting $TMUX.
2015-04-24Set up signal handler earlier so that we don't get zombies, reported bynicm
sobrado@.
2015-04-21Simplify error messages when socket connect fails, suggested by "Karthik K".nicm
2015-03-31Fix some format specifier nits, from Ben Boeckel.nicm
2014-10-20Tidy up some includes.nicm
2014-10-01Call waitpid on SIGCHLD even if client not attached, it is possible (onnicm
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.
2014-09-01Various minor style and spacing nits.nicm
2014-07-21lockf is entirely useless and it was a mistake to change to it, go backnicm
to using flock which actually works sensibly. Also always retry the lock to fix a potential race, and add some extra logging.
2014-07-13An EOF is a good reason to close a connection.krw
ok nicm@
2014-04-29fcntl.h is still needed here.nicm
2014-04-17Remove some unnecessary includes and fix a typo.nicm
2014-01-09Fix a memory/fd leak reported by Tiago Cunha.nicm