Log initialization

This commit is contained in:
pjht 2024-09-26 11:35:23 -05:00
parent 142c1d2aab
commit 8650d60a74
Signed by: pjht
GPG Key ID: CA239FC6934E6F3A
2 changed files with 16 additions and 6 deletions

5
Cargo.lock generated
View File

@ -139,6 +139,7 @@ name = "line_discipline"
version = "0.1.0"
dependencies = [
"itertools",
"termios",
]
[[package]]
@ -348,6 +349,10 @@ dependencies = [
"serde",
]
[[package]]
name = "termios"
version = "0.1.0"
[[package]]
name = "unicode-ident"
version = "1.0.13"

View File

@ -190,13 +190,17 @@ impl file_rpc::Server for Serv {
}
fn main() {
let devfs_pid;
loop {
if let Some(pid) = syscalls::try_get_registered(1) {
devfs_pid = pid;
break;
let syslog_pid = 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) {
break pid;
}
};
let devfs_client = devfs_rpc::Client::new(devfs_pid);
let serv = Serv {
ptys: Arc::new(RwLock::new(Slab::new())),
@ -207,6 +211,7 @@ fn main() {
dev_driver_rpc::register_server(Box::new(serv.clone()));
file_rpc::register_server(Box::new(serv.clone()));
devfs_client.register_dev("ptmx").unwrap();
syslog_client.send_text_message("pty_server", "PTY server initialized").unwrap();
loop {
ipc::process_messages()
}