From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751366AbdIMWqs (ORCPT ); Wed, 13 Sep 2017 18:46:48 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33471 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbdIMWqr (ORCPT ); Wed, 13 Sep 2017 18:46:47 -0400 X-Google-Smtp-Source: AOwi7QBSbs2uY8td8CDlvpp1YpSXOvJ3w8M2EVwWTioTfVxPMMNBQg1Tb2Y/nrUEVSVL5+K3bypuwQ== Date: Thu, 14 Sep 2017 01:46:43 +0300 From: Alexey Dobriyan To: Roman Gushchin Cc: linux-kernel@vger.kernel.org Subject: Re: [RFC] proc, coredump: add CoreDumping flag to /proc/pid/status Message-ID: <20170913224643.GA1741@avx2> References: <20170913221526.GA7808@avx2> <20170913222159.GA19288@castle> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170913222159.GA19288@castle> User-Agent: Mutt/1.7.2 (2016-11-26) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 13, 2017 at 03:21:59PM -0700, Roman Gushchin wrote: > On Thu, Sep 14, 2017 at 01:15:26AM +0300, Alexey Dobriyan wrote: > > > To provide an ability to detect if a process is in the state of > > > being coreduped, we can expose a boolean CoreDumping flag > > > in /proc/pid/status. > > > > Or add "State: C" ? > > A program in such state can also sleep and run, so it's not > a state in terms of process states. Well, maybe something will break from seeing unknown process state. Regardless, symlink /proc/$PID/coredump pointing to either "0" or "1" is faster than open+read+parse+close.