Skip to content

Commit

Permalink
netavark, dns: don't double-fork aardvark instead wait for process
Browse files Browse the repository at this point in the history
Netavark now does not double-forks aardvark-dns's server instead it
waits for aardvark-process to return back and success return means
aardvark-dns is ready to serve requests and now forking happens at
aardvark end.

This needs: containers/aardvark-dns#148

Signed-off-by: Aditya R <[email protected]>
  • Loading branch information
flouthoc committed Jun 15, 2022
1 parent 1d56470 commit 7cd459f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/dns/aardvark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,17 @@ impl Aardvark {
false => Stdio::null(),
};

// This command will block till aardvark-dns's parent process
// returns back.
Command::new(&aardvark_args[0])
.args(&aardvark_args[1..])
.stdin(Stdio::null())
.stdout(Stdio::null())
.stderr(output)
// set RUST_LOG for aardvark
.env("RUST_LOG", log::max_level().as_str())
.spawn()?;
.output()
.expect("failed to start aardvark-dns process");

Ok(())
}
Expand Down

0 comments on commit 7cd459f

Please sign in to comment.