]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sh: jobs -p: Do not ask the kernel for the pgid.
authorJilles Tjoelker <jilles@FreeBSD.org>
Sun, 5 Dec 2010 16:09:03 +0000 (16:09 +0000)
committerJilles Tjoelker <jilles@FreeBSD.org>
Sun, 5 Dec 2010 16:09:03 +0000 (16:09 +0000)
commit5af61b5251221b7977a769bc13c2e86e81952293
tree1e9f4e103f9294e6898bbfebc7a8b715a6ec86dd
parent9d67d2214f19d6f3aeb09f26a89f104415dd4d97
sh: jobs -p: Do not ask the kernel for the pgid.

The getpgid() call will fail if the first process in the job has already
terminated, resulting in output of "-1".

The pgid of a job is always the pid of the first process in the job and
other code already relies on this.
bin/sh/jobs.c