i have fixed this leak, cheers

On Sat, Apr 12, 2014 at 09:49:17PM +0100, Balazs Kezes wrote:
> On 2014-04-07 13:54 +0200, Pavlos Parissis wrote:
> > Let me know what I else I can do in order to help troubleshooting
> > this.
> 
> So I've skimmed the source again and now I've found an actual leak but
> I'm not sure you are hitting this or not. If the fork() in job_run()
> fails then tmux will definitely leak 2 fds. Is it possible that you have
> low process limits or huge amounts of processes or too little memory to
> fork?
> 
> Before fixing this particular leak here's what we can do to eliminate or
> prove this theory for your case. Check out the latest sources and apply
> the following to it:
> 
> diff --git a/job.c b/job.c
> index d7bd852..027a21d 100644
> --- a/job.c
> +++ b/job.c
> @@ -58,6 +58,7 @@ job_run(const char *cmd, struct session *s,
>  
>       switch (pid = fork()) {
>       case -1:
> +             open("/tmp/tmux_fork_proved", O_WRONLY|O_CREAT, 0666);
>               environ_free(&env);
>               return (NULL);
>       case 0:         /* child */
> 
> Then recompile, install and restart your tmux server. When you start
> seeing leaking fds again just check for the above file whether it exists
> and then report back.
> 
> Thank you!
> 
> -- 
> Balazs
> 
> ------------------------------------------------------------------------------
> Put Bad Developers to Shame
> Dominate Development with Jenkins Continuous Integration
> Continuously Automate Build, Test & Deployment 
> Start a new project now. Try Jenkins in the cloud.
> http://p.sf.net/sfu/13600_Cloudbees
> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to