Revert overzealous !parent_job is_visible() condition

This was added in 04a96f6 but not strictly required to fix #5803
(verified), with the intention of hiding invisible background jobs
(created by invoking a function within a pipeline) from the user, but
that also broke intentionally created jobs from displaying as well.

I'm thinking it can't be done without keeping track of caller context vs
job context.

Closes #5824.
This commit is contained in:
Mahmoud Al-Qudsi 2019-04-17 22:47:41 -05:00
parent d66ec08819
commit 8ca2641857

View File

@ -401,7 +401,7 @@ class job_t {
/// The job is in a stopped state
bool is_stopped() const;
/// The job is OK to be externally visible, e.g. to the user via `jobs`
bool is_visible() const { return !is_completed() && is_constructed() && !get_flag(job_flag_t::PENDING_REMOVAL) && !parent_job; };
bool is_visible() const { return !is_completed() && is_constructed() && !get_flag(job_flag_t::PENDING_REMOVAL); };
/// \return the parent job, or nullptr.
const std::shared_ptr<job_t> get_parent() const { return parent_job; }