mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:37:45 +00:00
LibCore: Make all processes opt out of InspectorServer by default
This functionality, while neat, isn't really something you need enabled all the time. Let's make it opt-in instead. Pass MakeInspectable::Yes to the Core::EventLoop constructor if you want your program to become inspectable.
This commit is contained in:
parent
76a07b31e4
commit
c9e849a968
4 changed files with 4 additions and 5 deletions
|
@ -26,7 +26,7 @@ public:
|
||||||
Yes,
|
Yes,
|
||||||
};
|
};
|
||||||
|
|
||||||
EventLoop(MakeInspectable = MakeInspectable::Yes);
|
explicit EventLoop(MakeInspectable = MakeInspectable::No);
|
||||||
~EventLoop();
|
~EventLoop();
|
||||||
|
|
||||||
int exec();
|
int exec();
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
int main(int, char**)
|
int main(int, char**)
|
||||||
{
|
{
|
||||||
Core::EventLoop event_loop(Core::EventLoop::MakeInspectable::No);
|
Core::EventLoop event_loop;
|
||||||
auto server = Core::LocalServer::construct();
|
auto server = Core::LocalServer::construct();
|
||||||
|
|
||||||
if (pledge("stdio unix accept", nullptr) < 0) {
|
if (pledge("stdio unix accept", nullptr) < 0) {
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
namespace WindowServer {
|
namespace WindowServer {
|
||||||
|
|
||||||
EventLoop::EventLoop()
|
EventLoop::EventLoop()
|
||||||
: m_event_loop(Core::EventLoop::MakeInspectable::No)
|
: m_window_server(Core::LocalServer::construct())
|
||||||
, m_window_server(Core::LocalServer::construct())
|
|
||||||
, m_wm_server(Core::LocalServer::construct())
|
, m_wm_server(Core::LocalServer::construct())
|
||||||
{
|
{
|
||||||
m_keyboard_fd = open("/dev/keyboard0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
m_keyboard_fd = open("/dev/keyboard0", O_RDONLY | O_NONBLOCK | O_CLOEXEC);
|
||||||
|
|
|
@ -27,7 +27,7 @@ int main(int argc, char** argv)
|
||||||
pid_t pid = 0;
|
pid_t pid = 0;
|
||||||
args_parser.add_positional_argument(pid, "PID", "pid");
|
args_parser.add_positional_argument(pid, "PID", "pid");
|
||||||
args_parser.parse(argc, argv);
|
args_parser.parse(argc, argv);
|
||||||
Core::EventLoop loop(Core::EventLoop::MakeInspectable::No);
|
Core::EventLoop loop;
|
||||||
|
|
||||||
Core::DirIterator iterator(String::formatted("/proc/{}/stacks", pid), Core::DirIterator::SkipDots);
|
Core::DirIterator iterator(String::formatted("/proc/{}/stacks", pid), Core::DirIterator::SkipDots);
|
||||||
if (iterator.has_error()) {
|
if (iterator.has_error()) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue