Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 2015 02:20:16 +0300
From:      Andrey Chernov <ache@freebsd.org>
To:        Ravi Pokala <rpokala@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r291114 - head/lib/libc/gen
Message-ID:  <564FAAB0.6000600@freebsd.org>
In-Reply-To: <201511202236.tAKMaf06048447@repo.freebsd.org>
References:  <201511202236.tAKMaf06048447@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 21.11.2015 1:36, Ravi Pokala wrote:
>   Move fdopen() up near other resource allocation like malloc(); do proper
>   deallocation on failure later on in the function.

Incorrect. Old code calls fdopen() only in the parent, new one calls
fdopen() before fork(), so its results shared by both parent and child,
which is wrong for child() case.

-- 
http://ache.vniz.net/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?564FAAB0.6000600>