aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2021-03-06 11:48:19 -0500
committerJesse Luehrs <doy@tozt.net>2021-03-06 11:56:37 -0500
commit0cbbf3b2e90c64748a180ae710ad798954cb89fa (patch)
tree97a717e01dfa5a2be767f1e7add6dfda977b0a28 /src
parent1302a9ff57ddd85fa2294a5b13c454279938b8e9 (diff)
downloadrbw-0cbbf3b2e90c64748a180ae710ad798954cb89fa.tar.gz
rbw-0cbbf3b2e90c64748a180ae710ad798954cb89fa.zip
disable PTRACE_ATTACH after daemonizing
this should let warnings go to the agent logs instead of the terminal
Diffstat (limited to 'src')
-rw-r--r--src/bin/rbw-agent/main.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/rbw-agent/main.rs b/src/bin/rbw-agent/main.rs
index 74ee258..69411ae 100644
--- a/src/bin/rbw-agent/main.rs
+++ b/src/bin/rbw-agent/main.rs
@@ -29,10 +29,6 @@ fn real_main() -> anyhow::Result<()> {
)
.init();
- if let Err(e) = debugger::disable_tracing() {
- log::warn!("{}", e);
- }
-
let no_daemonize = if let Some(arg) = std::env::args().nth(1) {
arg == "--no-daemonize"
} else {
@@ -45,6 +41,10 @@ fn real_main() -> anyhow::Result<()> {
Some(daemon::daemonize().context("failed to daemonize")?)
};
+ if let Err(e) = debugger::disable_tracing() {
+ log::warn!("{}", e);
+ }
+
let (w, r) = std::sync::mpsc::channel();
// can't use tokio::main because we need to daemonize before starting the
// tokio runloop, or else things break