From nobody Fri Aug 11 11:32:02 2023 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RMhTZ5Yvwz4pxKZ for ; Fri, 11 Aug 2023 11:32:02 +0000 (UTC) (envelope-from jamie@catflap.org) Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [IPv6:2001:19f0:7400:8808:123::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4RMhTZ3ylHz3c19; Fri, 11 Aug 2023 11:32:02 +0000 (UTC) (envelope-from jamie@catflap.org) Authentication-Results: mx1.freebsd.org; none X-Catflap-Envelope-From: Received: from donotpassgo.dyslexicfish.net (donotpassgo.dyslexicfish.net [209.250.224.51]) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5) with ESMTP id 37BBW21D064899; Fri, 11 Aug 2023 12:32:02 +0100 (BST) (envelope-from jamie@donotpassgo.dyslexicfish.net) Received: (from jamie@localhost) by donotpassgo.dyslexicfish.net (8.14.5/8.14.5/Submit) id 37BBW23A064898; Fri, 11 Aug 2023 12:32:02 +0100 (BST) (envelope-from jamie) From: Jamie Landeg-Jones Message-Id: <202308111132.37BBW23A064898@donotpassgo.dyslexicfish.net> Date: Fri, 11 Aug 2023 12:32:02 +0100 Organization: Dyslexic Fish To: pstef@FreeBSD.org, jamie@catflap.org Cc: freebsd-current@FreeBSD.org Subject: Re: ps(1) bugs and problems References: <202307282307.36SN7b7v026284@donotpassgo.dyslexicfish.net> In-Reply-To: User-Agent: Heirloom mailx 12.4 7/29/08 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (donotpassgo.dyslexicfish.net [209.250.224.51]); Fri, 11 Aug 2023 12:32:02 +0100 (BST) X-Rspamd-Queue-Id: 4RMhTZ3ylHz3c19 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:20473, ipnet:2001:19f0:7400::/38, country:US] "Piotr P. Stefaniak" wrote: > I thought about this more and the change I proposed in > https://reviews.freebsd.org/D41231 seems unnecessarily complicated, > regardless of which characters will be chosen to denote going up and > down the process tree. ps -D'^$' suggests there are possibly more > characters to use and maybe even some kind of DSL is available. > > So a simpler option is to keep the new aspect of -d (that it traverses > the tree down, even if ps is given a list of PIDs) and add a -D that > would work the same, but the other direction. That is indeed cleaner, and whilst the new "-D" option would cover the particular use case I mentioned, the old sorting method with arbitary, and specific PIDS is still useful. How about reverting '-d', and adding "-D" for descending, and "-A" for ascending? Cheers, Jamie