I tried compiling version 1.2 (pkgsrc is at 1.1) with and without
the changes you suggested. It always gives "fatal: main_callback:
msgbuf_write failed"; with suggested changes it spins:
6419 1 tmux RET recvmsg 0
6419 1 tmux CALL kevent(4,0x12008e000,1,0x12008f000,0x40,0x1ffffcf70)
6419 1 tmux RET kevent 1
6419 1 tmux CALL clock_gettime(3,0x1ffffcf70)
6419 1 tmux RET clock_gettime 0
6419 1 tmux CALL recvmsg(5,0x1ffffbe40,0)
6419 1 tmux GIO fd 5 read 0 bytes
""
Here's the kdump of `ktrace -di ./tmux` (truncated before line
1000; it refers to the compiled 1.2 version with client.c,
server-client.c and tmux.c modified):
http://chr.tx0.org/arch/ml/tmux/ktrace-20100424_3.txt
Well, I'll keep trying and report something if I manage to make it
work.
Thanks again.
Christian
Nicholas Marriott (Saturday 24 April 2010, 09:55):
>
> Looks like your poll may be returning an fd that isn't actually ready
> for reading, please tr this, although if it does it many times tmux may
> just spin:
>
> Index: client.c
> ===================================================================
> RCS file: /cvsroot/tmux/tmux/client.c,v
> retrieving revision 1.90
> diff -u -p -r1.90 client.c
> --- client.c 4 Dec 2009 22:14:47 -0000 1.90
> +++ client.c 24 Apr 2010 09:53:32 -0000
> @@ -262,7 +262,7 @@ client_callback(unused int fd, short eve
> ssize_t n;
>
> if (events & EV_READ) {
> - if ((n = imsg_read(&client_ibuf)) == -1 || n == 0)
> + if ((n = imsg_read(&client_ibuf)) == -1)
> goto lost_server;
> if (client_dispatch() != 0) {
> event_loopexit(NULL);
> Index: server-client.c
> ===================================================================
> RCS file: /cvsroot/tmux/tmux/server-client.c,v
> retrieving revision 1.31
> diff -u -p -r1.31 server-client.c
> --- server-client.c 8 Feb 2010 18:27:34 -0000 1.31
> +++ server-client.c 24 Apr 2010 09:53:32 -0000
> @@ -521,7 +521,7 @@ server_client_msg_dispatch(struct client
> struct msg_environ_data environdata;
> ssize_t n, datalen;
>
> - if ((n = imsg_read(&c->ibuf)) == -1 || n == 0)
> + if ((n = imsg_read(&c->ibuf)) == -1)
> return (-1);
>
> for (;;) {
> Index: tmux.c
> ===================================================================
> RCS file: /cvsroot/tmux/tmux/tmux.c,v
> retrieving revision 1.205
> diff -u -p -r1.205 tmux.c
> --- tmux.c 22 Apr 2010 21:48:49 -0000 1.205
> +++ tmux.c 24 Apr 2010 09:53:32 -0000
> @@ -671,7 +671,7 @@ main_dispatch(const char *shellcmd)
> struct msg_print_data printdata;
> struct msg_shell_data shelldata;
>
> - if ((n = imsg_read(main_ibuf)) == -1 || n == 0)
> + if ((n = imsg_read(main_ibuf)) == -1)
> fatalx("imsg_read failed");
>
> for (;;) {
>
--
SDF Public Access UNIX System - http://sdf.lonestar.org
------------------------------------------------------------------------------
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users