Commit Graph

8 Commits

Author SHA1 Message Date
Tiago Cunha
391f1f08c0 Expand the Id keyword. 2011-07-09 09:42:33 +00:00
Nicholas Marriott
30e8ed393e Whoops, get the logic the right way round. 2010-11-13 16:29:05 +00:00
Nicholas Marriott
94c2adf499 malloc(0) may return NULL, so only assume that is an error if allocating
more than zero.
2010-11-11 20:41:08 +00:00
Tiago Cunha
bebfd7c2c8 Sync OpenBSD patchset 706:
Rename some imsg bits to make namespace collisions less likely buf to
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.
2010-06-06 00:08:28 +00:00
Tiago Cunha
0646b3caf2 Sync OpenBSD patchset 680:
Remove XXX comment and just close received fd if calloc() fails.

If this happens the imsg may no longer be usable as there may be queued
messages, but this is a) already the case with the code now, and b)
would be the case if recvmsg() fails anyway, so we can document that -1
from imsg_read() invalidates the struct imsgbuf.

discussed with and ok eric
2010-04-12 21:45:18 +00:00
Nicholas Marriott
dd9dd142c9 Add $Id$, nuke queue.h. 2009-08-20 12:54:08 +00:00
Tiago Cunha
b402cef338 Adjust imsg changes to the portable version due to OpenBSD patchset 243. 2009-08-14 21:13:48 +00:00
Tiago Cunha
a9b6bfdddd Sync OpenBSD patchset 243:
Switch tmux to use imsg. This is the last major change to make the
client-server protocol more resilient and make the protocol versioning work
properly. In future, the only things requiring a protocol version bump will be
changes in the message structs, and (when both client and server have this
change) mixing different versions should nicely report an error message.

As a side effect this also makes the code tidier, fixes a problem with the way
errors reported during server startup were handled, and supports fd passing
(which will be used in future).

Looked over by eric@, thanks.

Please note that mixing a client with this change with an older server or vice
versa may cause tmux to crash or hang - tmux should be completely exited before
upgrading.
2009-08-14 21:04:04 +00:00