2022年10月10日(月) 22:47 Chet Ramey <chet.ra...@case.edu>:
> > 2022年10月4日(火) 0:56 Chet Ramey <chet.ra...@case.edu>:
> >>> I expect the same behavior of `f1' and `f2' as far as there are no
> >>> background jobs.
> >>
> >> Why? f2 calls `jobs', and so requests information in a particular format,
> >> which may or may not be the same format as the default (compact) format
> >> bash uses when it reports job status before printing a prompt.
> >
> > My point is *not* about the format of the output of `jobs', but
> > whether `jobs' should print the entries of foreground dead jobs, to
> > begin with.
>
> Yes. I believe that `jobs' should print the status of jobs that the shell
> would otherwise notify the user about. This includes foreground jobs that
> are killed by a signal other than SIGINT/SIGPIPE.

If you still think it should print the foreground dead jobs after
reading the rest of my previous email [1], I'm fine with the current
behavior.

https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00045.html

Then, I have a question: Is there any way to distinguish the entries
of foreground dead jobs from the ones for the background ones in the
output of the `jobs' command? If not, does it make sense to add a
special marker or a status word in pretty_print_job (jobs.c:2040) or
in print_pipeline (jobs.c:1939)?

--
Koichi

Reply via email to