[Top][All Lists]

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

Re: [PATCH] Fix foreground dead jobs in trap handlers reported like back

From: Koichi Murase
Subject: Re: [PATCH] Fix foreground dead jobs in trap handlers reported like background ones in `jobs'
Date: Tue, 15 Nov 2022 11:21:16 +0900

2022年10月10日(月) 22:47 Chet Ramey <chet.ramey@case.edu>:
> > 2022年10月4日(火) 0:56 Chet Ramey <chet.ramey@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


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)?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]