1.1 --- a/fsaccess/op_run.c Fri Jan 26 00:32:35 2024 +0100
1.2 +++ b/fsaccess/op_run.c Sun Feb 18 00:51:52 2024 +0100
1.3 @@ -239,8 +239,6 @@
1.4 return -1;
1.5 }
1.6
1.7 - printf("Finished program initiation.\n");
1.8 -
1.9 /* Release the relinquished end of the pipe. */
1.10
1.11 client_close(output_writer);
2.1 --- a/libexec/include/exec/process_monitor.h Fri Jan 26 00:32:35 2024 +0100
2.2 +++ b/libexec/include/exec/process_monitor.h Sun Feb 18 00:51:52 2024 +0100
2.3 @@ -1,7 +1,7 @@
2.4 /*
2.5 * A process monitor abstraction.
2.6 *
2.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
2.8 + * Copyright (C) 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
2.9 *
2.10 * This program is free software; you can redistribute it and/or
2.11 * modify it under the terms of the GNU General Public License as
2.12 @@ -34,6 +34,7 @@
2.13 public Resource
2.14 {
2.15 protected:
2.16 + bool _debug;
2.17
2.18 /* Resources associated with the created process. */
2.19
2.20 @@ -47,7 +48,7 @@
2.21 l4_cap_idx_t _notifier = L4_INVALID_CAP;
2.22
2.23 public:
2.24 - explicit ProcessMonitor();
2.25 + explicit ProcessMonitor(bool debug = false);
2.26
2.27 /* Server details. */
2.28
3.1 --- a/libexec/lib/src/external_pager.cc Fri Jan 26 00:32:35 2024 +0100
3.2 +++ b/libexec/lib/src/external_pager.cc Sun Feb 18 00:51:52 2024 +0100
3.3 @@ -1,7 +1,7 @@
3.4 /*
3.5 * A system pager implementation residing in a separate task.
3.6 *
3.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
3.8 + * Copyright (C) 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
3.9 *
3.10 * This program is free software; you can redistribute it and/or
3.11 * modify it under the terms of the GNU General Public License as
3.12 @@ -283,7 +283,9 @@
3.13
3.14 if (sig == 0)
3.15 {
3.16 +#if DEBUG
3.17 printf("Signal from internal pager.\n");
3.18 +#endif
3.19
3.20 /* For some reason, threads cannot be released by the process, so they are
3.21 also unmapped on its behalf. */
4.1 --- a/libexec/lib/src/process_monitor.cc Fri Jan 26 00:32:35 2024 +0100
4.2 +++ b/libexec/lib/src/process_monitor.cc Sun Feb 18 00:51:52 2024 +0100
4.3 @@ -1,7 +1,7 @@
4.4 /*
4.5 * A process monitor abstraction.
4.6 *
4.7 - * Copyright (C) 2022, 2023 Paul Boddie <paul@boddie.org.uk>
4.8 + * Copyright (C) 2022, 2023, 2024 Paul Boddie <paul@boddie.org.uk>
4.9 *
4.10 * This program is free software; you can redistribute it and/or
4.11 * modify it under the terms of the GNU General Public License as
4.12 @@ -34,8 +34,8 @@
4.13
4.14 /* A process monitor receiving signals from a task. */
4.15
4.16 -ProcessMonitor::ProcessMonitor()
4.17 -: NotificationSupport()
4.18 +ProcessMonitor::ProcessMonitor(bool debug)
4.19 +: NotificationSupport(), _debug(debug)
4.20 {
4.21 }
4.22
4.23 @@ -50,7 +50,8 @@
4.24
4.25 void ProcessMonitor::close()
4.26 {
4.27 - printf("Process monitor closing...\n");
4.28 + if (_debug)
4.29 + printf("Process monitor closing...\n");
4.30 }
4.31
4.32
4.33 @@ -123,7 +124,8 @@
4.34
4.35 if (sig == 0)
4.36 {
4.37 - printf("Signal from task.\n");
4.38 + if (_debug)
4.39 + printf("Signal from task.\n");
4.40
4.41 /* Cancel any IPC to avoid spurious pager warnings. */
4.42
5.1 --- a/libexec/rm/region_mapper.cc Fri Jan 26 00:32:35 2024 +0100
5.2 +++ b/libexec/rm/region_mapper.cc Sun Feb 18 00:51:52 2024 +0100
5.3 @@ -90,10 +90,13 @@
5.4 return 1;
5.5 }
5.6
5.7 - printf("Starting pager...\n");
5.8 + if (debug)
5.9 + printf("Starting pager...\n");
5.10 +
5.11 server.start(true);
5.12
5.13 - printf("Ending pager...\n");
5.14 + if (debug)
5.15 + printf("Ending pager...\n");
5.16 return 0;
5.17 }
5.18