From owner-freebsd-hackers@FreeBSD.ORG Wed Oct 5 22:54:01 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D551106564A; Wed, 5 Oct 2011 22:54:01 +0000 (UTC) (envelope-from artemb@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id 4436B8FC21; Wed, 5 Oct 2011 22:54:00 +0000 (UTC) Received: by gyf2 with SMTP id 2so2619792gyf.13 for ; Wed, 05 Oct 2011 15:54:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+HtX66Ohi0hIFSl2juMBVwQUbqGYiXeNGBEq6zCxTRc=; b=nNY6XCDY6n3JYympO4OrNOGO1ucHrUL/caG3RUo/sh5oQMiU2UPtQExsVf98ed/U4z LHUM4fFuAlmL8REluaGcly4/pHR0Ie+liVLPr0uSl4ZPWTy0kjAdkO0ljiMDSuUFjtST 5PG6OnIL/NxsKQdj30SFLJ6q4X64c4NU9SjzM= MIME-Version: 1.0 Received: by 10.236.123.43 with SMTP id u31mr18948yhh.97.1317855240520; Wed, 05 Oct 2011 15:54:00 -0700 (PDT) Sender: artemb@gmail.com Received: by 10.236.103.33 with HTTP; Wed, 5 Oct 2011 15:54:00 -0700 (PDT) In-Reply-To: <86wrcjf767.fsf@ds4.des.no> References: <86sjn84wco.fsf@ds4.des.no> <86obxw4s4w.fsf@ds4.des.no> <86fwj84p8i.fsf@ds4.des.no> <86wrcjf767.fsf@ds4.des.no> Date: Wed, 5 Oct 2011 15:54:00 -0700 X-Google-Sender-Auth: sYDSoIZMseBBXLUzIfNhNROKxY4 Message-ID: From: Artem Belevich To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Michael Bushkov , hackers@freebsd.org, =?ISO-8859-1?Q?Trond_Endrest=F8l?= Subject: Re: Does anyone use nscd? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2011 22:54:01 -0000 2011/10/5 Dag-Erling Sm=F8rgrav : > Michael Bushkov writes: >> 2. Consequences of the aforementioned problem can probably be >> corrected by using _setsockopt(..., SO_NOSIGPIPE) in >> __open_cached_connection() in nscachedcli.c > > That sounds like a workaround rather than a fix... Not necessarily. Using SO_NOSIGPIPE is a valid option when someone wants to see read/write on a closed socket fail and return -1 with errno=3DEPIPE. Quick grep in libc shows that resolver code in lib/libc/resolv/res_send.c also sets SO_NOSIGPIPE for exactly that reason. --Artem