Configure cargo

This commit is contained in:
Nullptr
2023-01-30 00:00:49 +08:00
parent e4b797a7ac
commit fc8b7c1b4d
3 changed files with 3 additions and 1 deletions

1
.gitignore vendored
View File

@@ -3,5 +3,4 @@
.cxx
build
local.properties
target
Cargo.lock

View File

@@ -0,0 +1,2 @@
[build]
target-dir = "build/intermediates/rust"

View File

@@ -171,6 +171,7 @@ fn create_daemon_socket(is64: bool) -> Result<UnixListener> {
let addr = UnixAddr::new_abstract(name.as_bytes())?;
let socket = nix::sys::socket::socket(AddressFamily::Unix, SockType::Stream, SockFlag::empty(), None)?;
nix::sys::socket::bind(socket, &addr)?;
nix::sys::socket::listen(socket, 2)?;
log::debug!("Listening on {}", addr);
log::debug!("Socket fd: {}", socket);
let listener = unsafe { UnixListener::from_raw_fd(socket) };