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"
|
||||
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"
|
||||
|
17
src/main.rs
17
src/main.rs
@ -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()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user