Commit Graph

286 Commits

Author SHA1 Message Date
dd92b6e83d Event base does not need to be global. 2015-08-30 22:19:07 +00:00
dcc28434f4 Merge branch 'obsd-master' 2015-07-13 20:01:08 +01:00
4e637b1b61 Ignore environment variables that are too long to send to the server. 2015-07-13 18:10:26 +00:00
37005d04a9 Merge branch 'obsd-master' 2015-06-14 12:01:10 +01:00
29c29e7717 Add a format for client PID (client_pid) and server PID (pid). Diff for
client_pid from Thomas Adam.
2015-06-14 10:07:44 +00:00
7acc4addb5 Merge branch 'obsd-master'
Conflicts:
	client.c
	tmux.1
	tmux.c
2015-06-07 23:42:25 +01:00
6b2129696f Move the nested check from client to server and compare the client tty
name to all the pane pty names instead of comparing socket paths. This
means that "new -d" will work without unsetting $TMUX.
2015-06-04 23:27:51 +00:00
56e1132db4 Merge branch 'obsd-master' 2015-04-25 10:02:46 +00:00
a5a873dccc Set up signal handler earlier so that we don't get zombies, reported by
sobrado@.
2015-04-24 20:58:44 +00:00
0a88377086 Merge branch 'obsd-master' 2015-04-22 10:05:54 +01:00
7a72eff4a4 Simplify error messages when socket connect fails, suggested by "Karthik K". 2015-04-21 22:21:41 +00:00
370cf75458 Merge branch 'obsd-master' 2015-04-19 14:44:56 +01:00
02df86079b Fix some format specifier nits, from Ben Boeckel. 2015-03-31 17:45:10 +00:00
747cab4281 No need for $Id$ now. 2014-11-08 12:27:43 +00:00
562af864bd Merge branch 'obsd-master'
Conflicts:
	Makefile
	cmd-list-commands.c
	cmd-suspend-client.c
	job.c
	tmux.h
	xmalloc.c
2014-10-21 07:11:44 +01:00
900f6fc17e Tidy up some includes. 2014-10-20 23:27:14 +00:00
045d0c3b9f Call waitpid on SIGCHLD even if client not attached, it is possible (on
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-10-01 23:23:19 +00:00
2874a431c0 Merge branch 'obsd-master' 2014-09-25 11:29:54 +01:00
4e956d545a Various minor style and spacing nits. 2014-09-01 21:50:18 +00:00
a131b82e95 Merge branch 'obsd-master'
Conflicts:
	client.c
2014-08-09 20:31:36 +01:00
8e4ae12b4d lockf is entirely useless and it was a mistake to change to it, go back
to using flock which actually works sensibly. Also always retry the lock
to fix a potential race, and add some extra logging.
2014-07-21 10:52:48 +00:00
krw
2b67907176 An EOF is a good reason to close a connection.
ok nicm@
2014-07-13 20:51:08 +00:00
ea5a223a2e Merge branch 'obsd-master' 2014-04-30 00:05:58 +01:00
5b2c8156d5 fcntl.h is still needed here. 2014-04-29 22:31:22 +00:00
953c3ef47a Merge branch 'obsd-master'
Conflicts:
	Makefile
	tmux.1
	window.c
2014-04-23 11:26:11 +01:00
bce952777a Remove some unnecessary includes and fix a typo. 2014-04-17 11:38:35 +00:00
d02c4bda3a Merge branch 'obsd-master' 2014-01-20 10:48:12 +00:00
b185449d07 Fix a memory/fd leak reported by Tiago Cunha. 2014-01-09 21:20:45 +00:00
adc1f21eae Three small changes from Tiago Cunha:
- 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.
2014-01-09 14:05:55 +00:00
3e498cdb49 Merge branch 'obsd-master' 2013-11-14 07:51:26 +00:00
7624800ddc from nicm: : handle msgbuf_write() returning EAGAIN 2013-11-13 20:43:36 +00:00
99e3cbc526 Use format_get_command() and some spacing tweaks. 2013-10-10 12:35:30 +00:00
c1ccefc62d We accidentally haven't been using $TMUX to work out the session for a
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.
2013-10-10 12:29:35 +00:00
7936ce3874 Show session name in detached message. Requested by somebody a few
months ago who didn't bother testing it. But it works for me anyway.
2013-10-10 12:28:08 +00:00
b8b85fbb0c Don't look at string[length - 1] if length == 0. 2013-10-10 12:27:38 +00:00
282c5f9644 Alter how tmux handles the working directory to internally use file
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.
2013-10-10 12:26:34 +00:00
10c38436aa Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048. 2013-10-10 12:13:56 +00:00
6c093010e0 Remove CMD_SENDENVIRON. 2013-10-10 12:09:34 +00:00
e9b09faab2 We accidentally haven't been using $TMUX to work out the session for a 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.
2013-10-06 22:38:33 +01:00
aa0a57fd56 Show session name in detached message. Requested by somebody a few months ago
who didn't bother testing it. But it works for me anyway.
2013-10-06 21:21:52 +01:00
d86c70af96 Don't look at string[length - 1] if length == 0. 2013-10-06 21:20:11 +01:00
4538c269d0 Alter how tmux handles the working directory to internally use file 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 '#{pane_current_path}'

The equivalent of default-path '~' is left as an exercise for the reader.

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.
2013-10-06 21:02:23 +01:00
fa1375c09f Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048. 2013-10-06 00:48:24 +01:00
f141e9b37a Instead of fixed size buffers for some messages, send only the string length. 2013-10-06 00:28:35 +01:00
01a4752503 Merge IDENTIFY_* flags with CLIENT_* flags. 2013-10-06 00:10:40 +01:00
7e4314eccb Remove CMD_SENDENVIRON. 2013-10-06 00:02:52 +01:00
e8567098a4 Add support for Cgywin, apparently it is enough just to open the tty again in
the server and fd passing is not necessary. Needs some ifdefs unfortunately but
no way around that and some of them can go next time we're willing to do a
protocol bump. Patch from J Raynor jxraynor at gmail dot com.
2013-07-12 22:21:42 +01:00
cd60e57b6a Merge branch 'obsd-master'
Sync from OpenBSD.
2013-04-23 08:26:04 +01:00
d89b35e682 Use lockf which is more portable than flock, from Dagobert Michelsen. 2013-04-22 08:42:19 +00:00
88b92df849 We ignore SIGWINCH until ready, so send a MSG_RESIZE immediately when
becoming ready.
2013-03-25 11:38:57 +00:00