standards/99926: [Patch] [sh(1)'s jobs] POSIX compliancy by adding -p switch

Ed Schouten ed at fxq.nl
Sat Jul 8 20:30:22 UTC 2006


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


More information about the freebsd-standards mailing list