"error: ‘AT_FDCWD’ undeclared (first use in this function)" on Mac OS X

2013-10-10 Thread harvey zh
Hi The latest git version cann't be compiled on Mac OS X. $ brew install --HEAD tmux failed. When compiled manually, I get the following errors: cmd-load-buffer.c: In function ‘cmd_load_buffer_exec’: cmd-load-buffer.c:90: error: ‘AT_FDCWD’ undeclared (first use in this function) cmd-load-buffer

Re: "error: ‘AT_FDCWD’ undeclared (first use in this function)" on Mac OS X

2013-10-10 Thread Thomas Adam
Hi, Did you "make clean" first, and rerun autogen.sh and run ./configure etc? -- Thomas Adam On 10 October 2013 08:18, harvey zh wrote: > Hi > > The latest git version cann't be compiled on Mac OS X. > $ brew install --HEAD tmux > > failed. > > When compiled manually, I get the following errors

Re: "error: ‘AT_FDCWD’ undeclared (first use in this function)" on Mac OS X

2013-10-10 Thread harvey zh
Hi, 2013/10/10 Thomas Adam > Hi, > > Did you "make clean" first, and rerun autogen.sh and run ./configure etc? > > Yes. Here is the error log: $ rm -rf /Library/Caches/Homebrew/tmux--git $ brew upgrade --HEAD tmux ==> Upgrading 1 outdated package, with result: tmux HEAD ==> Upgrading tmux ==>

Re: "error: ?AT_FDCWD? undeclared (first use in this function)" on Mac OS X

2013-10-10 Thread Nicholas Marriott
Try this please. diff --git a/Makefile.am b/Makefile.am index fb707df..690e466 100644 --- a/Makefile.am +++ b/Makefile.am @@ -238,6 +238,9 @@ endif if NO_CFMAKERAW nodist_tmux_SOURCES += compat/cfmakeraw.c endif +if NO_OPENAT +nodist_tmux_SOURCES += compat/openat.c +endif # Install tmux.1 in

Re: Calling external programs in statusline creates pauses over time

2013-10-10 Thread Nicholas Marriott
Hmm have you got 6 clients attached? All the sockets must be the stdin/stdout/stderr from the jobs. What libevent version did you build tmux against? Can you run tmux -Lxyz - for long enough for your status line to update a few times (a couple of minutes would probably do) and then send me t

Re: "error: ?AT_FDCWD? undeclared (first use in this function)" on Mac OS X

2013-10-10 Thread harvey zh
Hello! 2013/10/10 Nicholas Marriott > Try this please. > > diff --git a/Makefile.am b/Makefile.am > index fb707df..690e466 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -238,6 +238,9 @@ endif > if NO_CFMAKERAW > nodist_tmux_SOURCES += compat/cfmakeraw.c > endif > +if NO_OPENAT > +nodis

Re: Calling external programs in statusline creates pauses over time

2013-10-10 Thread Chris Johnsen
I found an fd leak recently; it is not specific to jobs, but attempting to use a version-mismatched tmux client from run-shell or if-shell might create a situation like this. The "identify" message(s) sent by the client pass their stdin (and cwd in the latest commits). The server automatically acc

Re: Calling external programs in statusline creates pauses over time

2013-10-10 Thread Nicholas Marriott
I doubt this is the problem here but we might as well fix it. Can you send a patch? On Thu, Oct 10, 2013 at 04:43:07AM -0500, Chris Johnsen wrote: >I found an fd leak recently; it is not specific to jobs, but attempting to >use a version-mismatched tmux client from run-shell or if-shell

Re: "error: ?AT_FDCWD? undeclared (first use in this function)" on Mac OS X

2013-10-10 Thread Nicholas Marriott
Applied, thanks for testing. On Thu, Oct 10, 2013 at 05:18:09PM +0800, harvey zh wrote: >Hello! > >2013/10/10 Nicholas Marriott <[1]nicholas.marri...@gmail.com> > > Try this please. > > diff --git a/Makefile.am b/Makefile.am > index fb707df..690e466 100644 > --- a/Ma

[PATCH] Fix fd leak with protocol-mismatched client

2013-10-10 Thread Chris Johnsen
The server automatically accepts any fds the client sends (stdin and (recently) cwd). However, when a client indicates a different protocol version the server does not bother to keep track of the fds, but also does not close them. Immediately close any fds passed by clients advertising an incompat

Re: Calling external programs in statusline creates pauses over time

2013-10-10 Thread Jan Larres
On 10/10/13 22:43, Chris Johnsen wrote: > Jan, have you ever noticed a message like the following when you use > the bindings that use tmux inside run-shell? > > protocol version mismatch (client 7, server 8) Yes, but only after updating tmux yesterday until I restarted all my servers. It cert

Re: Calling external programs in statusline creates pauses over time

2013-10-10 Thread Jan Larres
On 11/10/13 12:29, Nicholas Marriott wrote: > There is a leak in format_get_command but I don't see any others: > > diff --git a/format.c b/format.c > index a7f1fde..2b00c3e 100644 > --- a/format.c > +++ b/format.c > @@ -353,7 +353,7 @@ format_expand(struct format_tree *ft, const char *fmt) > char

Re: Calling external programs in statusline creates pauses over time

2013-10-10 Thread Jan Larres
On 11/10/13 12:17, Nicholas Marriott wrote: > When is tmux pausing? Is it slow to attach? Slow to switch windows? Or > if you do eg "seq 10" does it pause during the output? It is pausing every time the statusline gets updated. I don't think actions like attaching and switching windows get slo