From owner-freebsd-questions@FreeBSD.ORG Mon Feb 15 08:13:28 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C5AB1065670 for ; Mon, 15 Feb 2010 08:13:28 +0000 (UTC) (envelope-from yuri@rawbw.com) Received: from shell0.rawbw.com (shell0.rawbw.com [198.144.192.45]) by mx1.freebsd.org (Postfix) with ESMTP id F18378FC19 for ; Mon, 15 Feb 2010 08:13:27 +0000 (UTC) Received: from eagle.syrec.org (stunnel@localhost [127.0.0.1]) (authenticated bits=0) by shell0.rawbw.com (8.14.4/8.14.4) with ESMTP id o1F8DRGb023130 for ; Mon, 15 Feb 2010 00:13:27 -0800 (PST) (envelope-from yuri@rawbw.com) Message-ID: <4B790227.6090803@rawbw.com> Date: Mon, 15 Feb 2010 00:13:27 -0800 From: Yuri User-Agent: Thunderbird 2.0.0.23 (X11/20100206) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Why lsof shows the file as open and fstat doesn't ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: yuri@rawbw.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2010 08:13:28 -0000 I am looking at one file which is actually a unix socket: /tmp/dbus-iQmkLjgxD6. "lsof | grep dbus-iQmkLjgxD6" shows that it's open by a particular process many times: ibus-daem 48407 yuri 4u unix 0xc966019c 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 5u unix 0xc9569000 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 6u unix 0xc955e9a8 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 7u unix 0xc8d25000 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 8u unix 0xc9596ce0 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 9u unix 0xc8f9b19c 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 10u unix 0xc916619c 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 11u unix 0xc9547338 0t0 /tmp/dbus-iQmkLjgxD6 ibus-daem 48407 yuri 12u unix 0xc9589670 0t0 /tmp/dbus-iQmkLjgxD6 But when I run "fstat /tmp/dbus-iQmkLjgxD6" it doesn't return anything, like this file isn't open at all. Why there is such discrepancy? Yuri