mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 21:05:06 +00:00

We now have a little widget that sits above the terminal view in the build/application console. When a child process is running, we show its PID, name, scheduling counter, and amount of resident memory in a live little overview. This is not working right just yet, since we don't know how to get to the actually active PID on the TTY. Or, well, we find the active PID by looking at the PGID of our fork()ed child. This manages to find children spawned by Shell, but not children spawned by make, for instance. I need to figure out how to find those.
21 lines
442 B
C++
21 lines
442 B
C++
#pragma once
|
|
|
|
#include <LibGUI/GWidget.h>
|
|
|
|
class ProcessStateWidget;
|
|
class TerminalWidget;
|
|
|
|
class TerminalWrapper final : public GWidget {
|
|
C_OBJECT(TerminalWrapper)
|
|
public:
|
|
virtual ~TerminalWrapper() override;
|
|
|
|
void run_command(const String&);
|
|
|
|
private:
|
|
explicit TerminalWrapper(GWidget* parent);
|
|
|
|
RefPtr<ProcessStateWidget> m_process_state_widget;
|
|
RefPtr<TerminalWidget> m_terminal_widget;
|
|
pid_t m_pid { -1 };
|
|
};
|