From owner-freebsd-standards@FreeBSD.ORG Sat Jul 8 20:30:22 2006 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D54E516A522 for ; Sat, 8 Jul 2006 20:30:22 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A4B343D5E for ; Sat, 8 Jul 2006 20:30:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k68KUJ4u001840 for ; Sat, 8 Jul 2006 20:30:19 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k68KUJ2u001839; Sat, 8 Jul 2006 20:30:19 GMT (envelope-from gnats) Resent-Date: Sat, 8 Jul 2006 20:30:19 GMT Resent-Message-Id: <200607082030.k68KUJ2u001839@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ed Schouten Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B019F16A4DA for ; Sat, 8 Jul 2006 20:27:19 +0000 (UTC) (envelope-from ed@compy.fxq.nl) Received: from swip.net (mailfe01.swip.net [212.247.154.1]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1699E43D45 for ; Sat, 8 Jul 2006 20:27:16 +0000 (GMT) (envelope-from ed@compy.fxq.nl) Received: from [83.180.59.125] (HELO compy.fxq.nl) by mailfe01.swip.net (CommuniGate Pro SMTP 5.0.8) with ESMTPS id 210920402 for FreeBSD-gnats-submit@freebsd.org; Sat, 08 Jul 2006 22:27:15 +0200 Received: from compy.fxq.nl (localhost [127.0.0.1]) by compy.fxq.nl (8.13.7/8.13.7) with ESMTP id k68KRCgI040105 for ; Sat, 8 Jul 2006 22:27:12 +0200 (CEST) (envelope-from ed@compy.fxq.nl) Received: (from ed@localhost) by compy.fxq.nl (8.13.7/8.13.7/Submit) id k68KRBYv040104; Sat, 8 Jul 2006 22:27:11 +0200 (CEST) (envelope-from ed) Message-Id: <200607082027.k68KRBYv040104@compy.fxq.nl> Date: Sat, 8 Jul 2006 22:27:11 +0200 (CEST) From: Ed Schouten To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: standards/99926: [Patch] [sh(1)'s jobs] POSIX compliancy by adding -p switch X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ed Schouten List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Jul 2006 20:30:22 -0000 >Number: 99926 >Category: standards >Synopsis: [Patch] [sh(1)'s jobs] POSIX compliancy by adding -p switch >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jul 08 20:30:18 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ed Schouten >Release: FreeBSD 7.0-CURRENT i386 >Organization: >Environment: System: FreeBSD compy.fxq.nl 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Sun Jul 2 10:55:26 CEST 2006 root@compy.fxq.nl:/usr/obj/usr/src/sys/COMPY i386 >Description: According to the POSIX 2001 standard, the jobs command in sh(1) should implement a -p switch that displays output similar to FreeBSD's -s switch, but only shows PIDs for process group leaders. It isn't available, however. >How-To-Repeat: Run the following commands in sh(1); $ sleep 10 | cat & $ jobs -p The latter command will fail, because the built-in jobs command does not support the -p switch. >Fix: Apply the patch located at: http://g-rave.nl/junk/freebsd-sh-jobs-posix.diff This patch adds an argument 'pformat' the showjob() and showjobs() functions. When set, its output format is the same as when 'sformat' is set, but limited to process group leaders only. The sh(1) manual page has also been updated to reflect the changes. Please note that this patch marks the 'Add missing components to the jobs utility.' task of the C99 project as completed. >Release-Note: >Audit-Trail: >Unformatted: