[LTP] [PATCH v2 1/2] doc: Document process_state
Cyril Hrubis
chrubis@suse.cz
Tue Jan 6 14:21:06 CET 2026
Hi!
> > > - * R - process is running
> > > - * S - process is sleeping
> > > - * D - process sleeping uninterruptibly
> > > - * Z - zombie process
> > > - * T - process is traced
> > > + * Possible process states:
> > Maybe: use link to https://man7.org/linux/man-pages/man1/ps.1.html ?
> >
> > -* Possible process states:
> > +* Possible process states (see :man1:`ps`):
>
> 1. We do not have man1 defined in exlinks in conf.py
>
> 2. Even if added there exlinks does not seem work from documentation
> generated from headers
This actually works, once I fixed typo in the conf.py change.
> > > + * - **R** Process is running.
> > > + * - **S** Process is sleeping.
> > > + * - **D** Process sleeping uninterruptibly.
> > > + * - **Z** Zombie process.
> > > + * - **T** Process is traced.
> > > + * - **t** Tracing stopped.
> > > + * - **X** Process id dead.
> >
> > Process state is outdated, man ps(1) lists:
> >
> > D uninterruptible sleep (usually I/O)
> > I idle kernel thread
> > R running or runnable (on run queue)
> > S interruptible sleep (waiting for an
> > event to complete)
> > T stopped by job control signal
> > t stopped by debugger during the tracing
> > W paging (not valid since Linux 2.6)
> > X dead (should never be seen)
> > Z defunct (“zombie”) process, terminated
> > but not reaped by its parent
> >
> > We miss:
> > * I (from kernel 4.2, maybe not relevant when we use it for a child which
> > is userspace)
> > * W (irrelevant as it is not valid)
>
> Indeed these are not relevent for us.
>
> > * Z
>
> Zombie process is described in the list.
>
> > Also, do we want specify the process states in both TST_PROCESS_STATE_WAIT() and
> > TST_THREAD_STATE_WAIT(), or just specify it in one and mention in the other that
> > they specify it? (via :ref: or c:func:).
>
> Again, none of the :ref: or c:func: is working in docs generate from
> headers.
And this one needs to be just TST_PROCESS_STATE_WAIT() to be processed
as a link in headers.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list