zdir-librarian 0.1.5
Rust binds a Unix-domain socket listenerReferences a public code-forge URL
SHA-2565e5edb83d2dcc79af79d1f31ed6cddc6da222d58457e828c6bcc170d1232f27f
MaleculeH₂(Cm₃F)
Evidence
104:20… :create_dir_all(parent).unwrap();
105 }
106 fs::File::create(path).unwrap();
107 Database::create(db_path())
108 .expect("Failed to create database. Is the path writable?")
109 }
110 };
111 let db = Arc::new(db);
112
113 // MARK: housekeeping thread
8:15… error, info};
9
10fn socket_path() -> String {
11 "/tmp/zdir-".to_string() + &unsafe { libc::getuid().to_string() } + ".sock"
12}
13
14pub fn socket(tx: mpsc::Send …
18:12… :remove_file(socket_path()).unwrap();
19 }
20
21 let listener = UnixListener::bind(socket_path()).unwrap();
22 for connection in listener.incoming() {
23 match connection {
24 Ok(mut stream) => {
29:12… let _ = tx.send(message);
30
31 while let Ok(query) = rx.recv() {
32 stream.write_all(query.as_bytes()).unwrap();
33 stream.flush().unwrap();
34 break;
35 }
36 …
1# zdir-librarian
2
3_zdir-librarian_ is the background daemon for [zdir](https://github.com/indium114/zdir) ([crates.io](https://crates.io/crates/zdir))
4
5## setup
⋯4 lines
No evidence locations were recorded for this file. Raw result