From owner-freebsd-net@FreeBSD.ORG Thu Jan 15 18:20:09 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F09F976 for ; Thu, 15 Jan 2015 18:20:09 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A856AABF for ; Thu, 15 Jan 2015 18:20:08 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id l15so37003948wiw.2 for ; Thu, 15 Jan 2015 10:20:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=SYJBbt2iN3BpC5HA8IGnZ3/xrfggobbwJWDzQ0C1hIg=; b=Gq/mQQeBnXgl61zCPtnA3JyIyjLCXvrHbAMjlzkc1Zs+c6oNDqkuQcWxKOuUD69f/U 0M4wVpDJYMEbnoJnhFek2Nl91hbJWlVdG/KVR+pjINZtHo5gArXGaIU00j9sVkZ3Wv7l l/PkMvzpdRF6y48haxZp98dgLJWmORLx9KlklhZF7SmP4FzNFHWXj5zUXeCN4+LzKB88 qLqSrmw5M4mNqr2+IFzmrh37OK4WboqQT4oSBNpg7q6RdCfDTkRB4ZWbGQLAXyTblzhT C4gnSnmnFmLqdF7GkIYiByq0y6qo4uWkTjSK+A8gy2nIdZMIaHA2nfoCOftEWSrbFUAg LzkA== MIME-Version: 1.0 X-Received: by 10.194.5.37 with SMTP id p5mr21493173wjp.20.1421346006917; Thu, 15 Jan 2015 10:20:06 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Thu, 15 Jan 2015 10:20:06 -0800 (PST) In-Reply-To: <1421339375968.94209@netapp.com> References: <1421339375968.94209@netapp.com> Date: Thu, 15 Jan 2015 10:20:06 -0800 X-Google-Sender-Auth: Juhfb_BJshD8sF5eJ7O7rTR5CZk Message-ID: Subject: Re: Accessing socket APIs soon after accept From: Adrian Chadd To: "Quattlebaum, Ryan" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-net@freebsd.org" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jan 2015 18:20:09 -0000 On 15 January 2015 at 08:29, Quattlebaum, Ryan wrote: > Is there anything preventing applications from calling functions e.g. get= sockname() right after accept()? Or is there a recommended pattern that app= lications should use to ensure they get correct data? We recently upgraded = to a new version of Apache and are seeing uninitialized data coming back fr= om a few of these calls. I'm under the impression that once you get the FD from accept(), it should be fully formed and ready. Which version of FreeBSD/apache is it? can you come up with a test case that shows that it's happening? -adrian > Thanks, > > Ryan Quattlebaum > Software Developer, NetApp, Inc. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"