From owner-cvs-src@FreeBSD.ORG Mon May 31 19:03:25 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D69016A4CE; Mon, 31 May 2004 19:03:25 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4241B43D5D; Mon, 31 May 2004 19:03:25 -0700 (PDT) (envelope-from gad@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i5123MTV014667; Mon, 31 May 2004 19:03:22 -0700 (PDT) (envelope-from gad@repoman.freebsd.org) Received: (from gad@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i5123MgA014666; Mon, 31 May 2004 19:03:22 -0700 (PDT) (envelope-from gad) Message-Id: <200406010203.i5123MgA014666@repoman.freebsd.org> From: Garance A Drosehn Date: Mon, 31 May 2004 19:03:22 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/bin/ps ps.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2004 02:03:25 -0000 gad 2004/05/31 19:03:22 PDT FreeBSD src repository Modified files: bin/ps ps.c Log: Rewrite the kludge-option processing to improve how it handles a few more special situations. This is the code which process `ps blah', when "blah" does not include a leading '-'. This change also removes a long-undocumented BACKWARD_COMPATIBILITY compile-time option, where: ps -options arg1 arg2 (with no '-' on "arg1" and "arg2") was treated as: ps -options -N arg1 -M arg2 This also changes `ps' to check for any additional arguments after processing all the '-'-options, and attempt to use those arguments as a pid or pidlist. If an extra argument is not a valid pidlist, then `ps' will print an error and exit. This seems a more generally useful extension of the kludge-option processing than the -N/-M behavior, and has fewer confusing side-effects. Reviewed by: freebsd-arch Revision Changes Path 1.92 +91 -62 src/bin/ps/ps.c