On Fri, Jan 07, 2022 at 05:08:16PM +0100, Jan Stary wrote: > This is how ps(1) differentiates between displaying > processes that have a terminal and those that have not: > > -a Display information about processes > for all users with controlling terminals. > > -x Display information about processes > without controlling terminals. > > Strangely, some processes appear in both listings: > > $ ps -a | grep man > 22867 p6 Ip 0:00.02 man ps > 82326 p6 I+p 0:00.02 less -T /tmp/man.TkUznrbk0K /tmp/man.qGVXE5xsvJ > 43736 p7 R+p/3 0:00.00 grep man > > $ ps -x | grep man > 22867 p6 Ip 0:00.02 man ps > 82326 p6 I+p 0:00.02 less -T /tmp/man.TkUznrbk0K /tmp/man.qGVXE5xsvJ > 50867 p7 R+p/2 0:00.05 grep man > > Is this intended? Am I missing something obvious? > Or does the wording mean "users with controlling terminals"? > > Jan > >
The man page should say something like: -a include processes other than your own, but skip processes without controlling terminal, unless -x is also specified -x include processes without controlling terminal. -Otto