warning message when exiting with active jobs uses PID of first process, not PGID

Work on #4303.

(cherry picked from commit eb081481c64c34b3a048ad28aa9161f5f8b2bfcf)
This commit is contained in:
David Adam 2017-10-31 19:17:19 +08:00
parent da2201d69a
commit 007a62cab6

View File

@ -2197,7 +2197,7 @@ static void bg_job_warning() {
job_iterator_t jobs;
while (job_t *j = jobs.next()) {
if (!job_is_completed(j)) {
fwprintf(stdout, L"%6d %ls\n", j->pgid, j->command_wcstr());
fwprintf(stdout, L"%6d %ls\n", j->processes[0]->pid, j->command_wcstr());
}
}
fputws(L"\n", stdout);