Log initialization
This commit is contained in:
parent
142c1d2aab
commit
8650d60a74
5
Cargo.lock
generated
5
Cargo.lock
generated
@ -139,6 +139,7 @@ name = "line_discipline"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"itertools",
|
"itertools",
|
||||||
|
"termios",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -348,6 +349,10 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "termios"
|
||||||
|
version = "0.1.0"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-ident"
|
name = "unicode-ident"
|
||||||
version = "1.0.13"
|
version = "1.0.13"
|
||||||
|
15
src/main.rs
15
src/main.rs
@ -190,13 +190,17 @@ impl file_rpc::Server for Serv {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let devfs_pid;
|
let syslog_pid = loop {
|
||||||
loop {
|
if let Some(pid) = syscalls::try_get_registered(2) {
|
||||||
|
break pid;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let syslog_client = syslog_rpc::Client::new(syslog_pid);
|
||||||
|
let devfs_pid = loop {
|
||||||
if let Some(pid) = syscalls::try_get_registered(1) {
|
if let Some(pid) = syscalls::try_get_registered(1) {
|
||||||
devfs_pid = pid;
|
break pid;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
let devfs_client = devfs_rpc::Client::new(devfs_pid);
|
let devfs_client = devfs_rpc::Client::new(devfs_pid);
|
||||||
let serv = Serv {
|
let serv = Serv {
|
||||||
ptys: Arc::new(RwLock::new(Slab::new())),
|
ptys: Arc::new(RwLock::new(Slab::new())),
|
||||||
@ -207,6 +211,7 @@ fn main() {
|
|||||||
dev_driver_rpc::register_server(Box::new(serv.clone()));
|
dev_driver_rpc::register_server(Box::new(serv.clone()));
|
||||||
file_rpc::register_server(Box::new(serv.clone()));
|
file_rpc::register_server(Box::new(serv.clone()));
|
||||||
devfs_client.register_dev("ptmx").unwrap();
|
devfs_client.register_dev("ptmx").unwrap();
|
||||||
|
syslog_client.send_text_message("pty_server", "PTY server initialized").unwrap();
|
||||||
loop {
|
loop {
|
||||||
ipc::process_messages()
|
ipc::process_messages()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user