Commit Graph

302 Commits

Author SHA1 Message Date
2977317243 Merge branch 'obsd-master' 2018-11-22 12:02:38 +00:00
3a7b9d5735 Do not use PWD unless it actually matches the real working directory. 2018-11-22 10:36:40 +00:00
91280f1fca Linux: include sys/file.h for flock() 2018-06-07 09:17:05 +01:00
645fe9013f Merge branch 'obsd-master' 2018-04-26 17:02:31 +01:00
896c1da7da Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@
2018-04-26 12:42:51 +00:00
06684c93de Merge branch 'obsd-master' 2018-01-01 12:01:13 +00:00
d17c90583a Prefer PWD for current directory if present in client, from Wei Zhao in
GitHub issue 1183.
2018-01-01 11:19:08 +00:00
74ecc866cf Merge branch 'obsd-master' 2017-12-19 16:01:20 +00:00
b20a00f93e Report better error from server when socket create fails, GitHub issue
1201.
2017-12-19 15:00:39 +00:00
641a885af8 Merge branch 'obsd-master' 2017-12-19 00:01:18 +00:00
62144b9f57 Do not try to put more in command message than will fit when sending
(the server will treat as a fatal error). GitHub issue 1200.
2017-12-18 22:13:36 +00:00
acbbc93501 Merge branch 'obsd-master' 2017-07-14 22:01:10 +01:00
932f6cfbfc Because ignore SIGCHLD early, letting signal_del restore it doesn't work
correctly, so set it explicitly back to default (and the others for good
measure).
2017-07-14 18:49:07 +00:00
1076a2e26c Merge branch 'obsd-master'
Conflicts:
	cmd-pipe-pane.c
	proc.c
	tmux.c
	window.c
2017-07-12 13:43:08 +01:00
0453ad0146 Move signal code into proc.c. 2017-07-12 09:24:17 +00:00
ed3cfaafb2 Make shell_command a global like other stuff rather than making it an
exception and using callback argument.
2017-07-12 09:21:25 +00:00
418ab1a553 Merge branch 'obsd-master' 2017-01-24 22:01:13 +00:00
85338bb75f Add support for custom command aliases, this is an array option which
contains items of the form "alias=command". This is consulted when an
unknown command is parsed.
2017-01-24 19:53:37 +00:00
a3d5bfcece Define away pledge() on !OpenBSD. 2017-01-23 12:27:58 +00:00
b3a724f30c Merge branch 'obsd-master'
Conflicts:
	Makefile
	tmux.c
2017-01-23 12:20:43 +00:00
98e7fbb2ac Open /dev/ptm before pledge() and save it to be used for PTMGET later
(this means inlining forkpty()).

ok deraadt
2017-01-23 10:09:43 +00:00
c17b0a202a Merge branch 'obsd-master' 2017-01-20 16:01:11 +00:00
46572ba904 Print error rather than fatal() if tcgetattr() fails, which is much more
useful to user.
2017-01-20 14:02:33 +00:00
ef15b4195f Revert WIP parts of previous I didn't mean to commit yet. 2017-01-16 14:52:25 +00:00
68db958477 getopt() has a struct option so just return to using options_entry. 2017-01-16 14:49:14 +00:00
2311bbd28a Merge branch 'obsd-master' 2017-01-13 12:01:12 +00:00
95950bf668 Add -E to detach-client to exec a command to replace the client instead
of exiting it, useful if tmux wasn't exec'd itself. From Jenna Magius.
2017-01-13 10:12:12 +00:00
4740ecbeae Merge branch 'obsd-master' 2016-10-04 02:01:11 +01:00
1b31d148c9 Remove some dead code in cmd-move-window.c and make a load of local
functions static.
2016-10-03 22:52:11 +00:00
dc42c35f1f Merge branch 'obsd-master' 2016-01-19 18:01:15 +00:00
995af0e2b7 I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
890d8da2e3 Merge branch 'obsd-master'
Conflicts:
	log.c
	proc.c
	tmux.c
2015-11-25 16:37:30 +00:00
ac8678aefe Don't print error if none to print. 2015-11-25 07:58:55 +00:00
3ff46b2e43 Shell command from -c doesn't have to be global, pass it as an argument. 2015-11-24 23:22:51 +00:00
dca93c56e0 Do lock failures slightly better, return a special value so we don't
unlink the wrong thing.
2015-11-24 23:01:51 +00:00
73e30cbda8 Actually show something (even if it not that helpful) if the server
fails to start (for example if it can't create the socket), rather than
hanging or showing nothing.
2015-11-24 22:45:44 +00:00
c913fb99b6 Tidy the code that works out the socket path, and just use the full path
in the global socket_path rather than copying it.
2015-11-24 22:27:22 +00:00
bef217b241 Switch a fprintf to a fatal, and wrap some long lines. 2015-11-24 22:04:36 +00:00
7fe8edc396 Merge branch 'obsd-master' 2015-11-18 16:01:23 +00:00
577c0e3e5a Use __unused rather than rolling our own. 2015-11-18 14:27:44 +00:00
8213558cc7 Merge branch 'obsd-master'
Conflicts:
	server.c
	tmux.c
2015-11-15 22:49:25 +00:00
a582b62287 Accidentally turned off pledge, turn it back on. 2015-11-15 14:32:48 +00:00
7b749eff35 Merge branch 'obsd-master'
Conflicts:
	server.c
	tmux.c
2015-11-14 11:38:30 +00:00
c56b81a2ce Push stdout and stderr to clients more aggressively, and add an event to
continue if the send fails.
2015-11-14 09:41:06 +00:00
c975de2e07 Merge branch 'obsd-master'
Conflicts:
	server.c
2015-10-31 23:56:35 +00:00
b0a99e85b6 Don't shift version out of peerid, it is needed later. 2015-10-31 13:43:38 +00:00
17f6c3be8e Merge branch 'obsd-master' 2015-10-31 10:01:12 +00:00
01defc9f49 Because pledge(2) does not allow us to pass directory file descriptors
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-31 08:13:58 +00:00
a5e4d3a2d8 Merge branch 'obsd-master' 2015-10-28 12:01:11 +00:00
bf9c933cae Like options, move the environ struct into environ.c. 2015-10-28 09:51:55 +00:00