Shell: Move printing job status into a Job::print_status() helper

This is only used by the "jobs" builtin right now, but more soon.
This commit is contained in:
Andreas Kling 2020-08-06 15:09:25 +02:00
commit 22dd5a7021
Notes: sideshowbarker 2024-07-19 04:13:32 +09:00
4 changed files with 86 additions and 44 deletions

View file

@ -92,6 +92,14 @@ public:
void deactivate() const { m_active = false; }
enum class PrintStatusMode {
Basic,
OnlyPID,
ListAll,
};
bool print_status(PrintStatusMode);
private:
Job(pid_t pid, unsigned pgid, String cmd, u64 job_id)
: m_pgid(pgid)