Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Jul 2006 22:27:11 +0200 (CEST)
From:      Ed Schouten <ed@fxq.nl>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   standards/99926: [Patch] [sh(1)'s jobs] POSIX compliancy by adding -p switch
Message-ID:  <200607082027.k68KRBYv040104@compy.fxq.nl>
Resent-Message-ID: <200607082030.k68KUJ2u001839@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607082027.k68KRBYv040104>