From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@9fans.net Date: Tue, 16 Feb 2016 18:42:02 +0200 From: lucio@proxima.alt.za In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] file descriptor leak Topicbox-Message-UUID: 8524728e-ead9-11e9-9d60-3106f5b1d025 > I've had this problem too, I have yet to resolve it. You could start by tossing the very first and totally superfluous "else". to simplify things. Then, it would be tempting to take the dup(fd,0); close(fd); out to before the if(pid==0)... Well spotted, Kenji. Let's hope my shot in the dark is half as good :-) Lucio.