lkml.org 
[lkml]   [2017]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC] proc, coredump: add CoreDumping flag to /proc/pid/status
On Thu, Sep 14, 2017 at 01:46:43AM +0300, Alexey Dobriyan wrote:
> 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.

Performance doesn't really matter in this case: nobody should check
this flag often. An expected usecase is described above: check the flag
once before killing the process by timeout.
So, it doesn't look deserving a separate entity in procfs.

\
 
 \ /
  Last update: 2017-09-14 01:08    [W:0.044 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site