NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/50337: pgrep: -d outputs delimiter as terminator

>Number:         50337
>Category:       bin
>Synopsis:       pgrep: -d outputs delimiter as terminator
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 13 17:10:01 +0000 2015
>Originator:     Christian Neukirchen
>Release:        5.2.3 (also in 7.0)
NetBSD zhora 5.2.3 NetBSD 5.2.3 (XEN3_DOMU) #0: Sat Nov 15 21:06:05 UTC 2014 amd64
The -d flag of pgrep is supposed to "Specify a delimiter to be printed between each process ID."

Instead, the delimiter is also outputted after the final PID, where a newline should be printed instead.

Fixed in OpenBSD pkill.c,v 1.8 from 2005/02/11, ported patch below.
% pgrep -d, t
932,931,930,929,928,927,926,925,% _

Contrast with Linux procps-ng 3.3.11, Solaris 5.11 or OpenBSD 5.7:

% pgrep -d, t
% _
Patch ported from OpenBSD available at

Also see for the equivalent bug in FreeBSD.

Home | Main Index | Thread Index | Old Index