From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23952 invoked by alias); 23 Mar 2015 20:36:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23932 invoked by uid 89); 23 Mar 2015 20:36:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 23 Mar 2015 20:36:43 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2NKafvc022143 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 23 Mar 2015 16:36:41 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2NKaeBj004080; Mon, 23 Mar 2015 16:36:41 -0400 Message-ID: <55107958.1010605@redhat.com> Date: Mon, 23 Mar 2015 20:36:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Sergio Durigan Junior CC: GDB Patches Subject: Re: [PATCH 1/2] Implement support for checking /proc/PID/coredump_filter References: <1426807358-18295-1-git-send-email-sergiodj@redhat.com> <1426807358-18295-2-git-send-email-sergiodj@redhat.com> <550C7118.6080605@redhat.com> <87vbhvwi7x.fsf@redhat.com> <550C98E9.1030802@redhat.com> <87bnjj8smm.fsf@redhat.com> In-Reply-To: <87bnjj8smm.fsf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2015-03/txt/msg00756.txt.bz2 On 03/23/2015 06:40 PM, Sergio Durigan Junior wrote: > Done. Patch attached. I will wait until you look at the second patch > (and approve it) in order to commit everything together. Thanks. FAOD, this version is OK. On 03/23/2015 06:40 PM, Sergio Durigan Junior wrote: > Jan has provided a good example of it before. When you use stat -L, you > can see if the 'Links' count is zero (which means the real file has been > really deleted). For example: > > lrw-------. 1 sergio sergio 64 Mar 23 14:34 7f2c5911b000-7f2c5911c000 -> /tmp/t2 (deleted) > [root@bla map_files]# stat -L 7f2c5911b000-7f2c5911c000 > File: ‘7f2c5911b000-7f2c5911c000’ > Size: 0 Blocks: 0 IO Block: 4096 regular empty file > Device: 23h/35d Inode: 217633770 Links: 1 > > The 'Links' is 1 because, despite the fact that 't2' has been deleted, > the original file 't1' still exists. However, if I remove 't1': > > [root@bla map_files]# stat -L 7f2c5911b000-7f2c5911c000 > File: ‘7f2c5911b000-7f2c5911c000’ > Size: 0 Blocks: 0 IO Block: 4096 regular empty file > Device: 23h/35d Inode: 217633770 Links: 0 > > Therefore, it should be possible to use stat even in this case. But > anyway, this was just FYI, we're not doing that. Ah, yes, these files really work as symlinks, so ls -l was just showing the symlink's own link count. "ls -l -L" works too. Thanks, Pedro Alves