Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: `jobs -p` does not behave as documented and required by POSIX
- X-seq: zsh-workers 42150
- From: Eric Pruitt <eric.pruitt@xxxxxxxxx>
- To: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- Subject: Re: `jobs -p` does not behave as documented and required by POSIX
- Date: Wed, 20 Dec 2017 02:42:05 -0800
- Cc: Matthias Richerzhagen <matthias.richerzhagen@xxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:pgp-key:user-agent; bh=aB1Mdfj4Qlqxmrgx8uO3RSxVBjtAVpkPPOSE3g2ILPs=; b=X6rG8sO/Q0+KoXslmsvZmgjgXVbLj5FsRZ0/dv8AzzBZFzmX7FzZimVK8gAfYf0O1S DbXl0ugIZPgntZJPtDg6tDYlgO/l5MYPnq4Dtf57s/gwc41TtjTyk7GSAFsYD8LkZQWW Onqf2hj9IzUweHJrwVr6NgxIY/jyEx9A9SQ5BYfHP4HuwEo6woBXK0RIJtg8G1F8FTtI JgnBCo534HStJQ13RRINN1VP8tMNWLGiISBZlyOd7EmZuuNUcD+H/osD/Fy9kb12yBn0 7WA57IsT4lfqL6JSl85F1nHEAlunJj6H4MjURNo1yyEiGTzmjc+slltm9RMdIHkt25AE bD+Q==
- In-reply-to: <20171220094549.1d755d1a@pwslap01u.europe.root.pri>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: Peter Stephenson <p.stephenson@xxxxxxxxxxx>, Matthias Richerzhagen <matthias.richerzhagen@xxxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Pgp-key: https://www.codevat.com/pgp.asc#F8601B5D2511B4C3535232488DDDE2E6053692AB
- References: <CGME20171220080716epcas1p14317a75dd17abfa9d127ef341bcc383b@epcas1p1.samsung.com> <20171220085620.76561c93@zam158.zam.kfa-juelich.de> <20171220094549.1d755d1a@pwslap01u.europe.root.pri>
On Wed, Dec 20, 2017 at 09:45:49AM +0000, Peter Stephenson wrote:
> On Wed, 20 Dec 2017 08:56:20 +0100
> Matthias Richerzhagen <matthias.richerzhagen@xxxxxxxxxxxxxxxxxxx> wrote:
> > Hello,
> >
> > the manpage for the `jobs` buildin function states:
> >
> > > −p Display only the process IDs for the process group
> > > leaders of the selected jobs.
> >
> > > STDOUT
> > > If the −p option is specified, the output shall consist of one
> > > line for each process ID:
> > >
> > > "%d\n", <process ID>
>
> Erm, I don't think you're looking at the right manual...
The text Matthias is quoting is from the POSIX specification
(http://pubs.opengroup.org/onlinepubs/009695399/utilities/jobs.html). I
think their point is moot though because Z-shell does not claim to be
POSIX compliant in its default mode. That said, when running Z-shell as
"sh", the output of `jobs -p` still includes the "extra" information:
~$ (exec -a sh zsh -c 'sleep 1 & sleep 2 & jobs -p')
[1] - 1022 running sleep 1
[2] + 1023 running sleep 2
Eric
Messages sorted by:
Reverse Date,
Date,
Thread,
Author