[Timeline]
0:00 What is openconnect_wrapper
0:37 Why do I need this
0:52 Connecting using openconnect_wrapper
1:32 The hassle to reconnect
2:41 Reconnecting using openconnect_wrapper
3:15 Starting to look at the code
3:35 Initial version—trying out `Command`
5:18 Second commit—refresh, pipped stdin
8:48 Problem—openconnect not killed properly
10:23 Investigating how to send SIGTERM
12:20 Restructuring the code to use two loops
13:30 The function to send SIGTERM
13:54 Problem from manually killing process at reload
14:14 Potential solution using the ctrlc crate
16:37 Solution using the `drop` function (RAII)
17:32 Concluding the programming
18:00 Why I did not do this in Python instead
18:20 The little resources the wrapper uses
19:23 The end
[Sources]
openconnect_wrapper:
https://github.com/SichangHe/openconn...
Command in Rust std:
https://doc.rust-lang.org/std/process...
ctrlc—the Rust crate:
https://docs.rs/ctrlc/3.2.2/ctrlc/
How do I send a signal to a `Child` subprocess?—StackOverflow:
https://stackoverflow.com/questions/4...
Python subprocess doc:
https://docs.python.org/3/library/sub...
Auf dieser Seite können Sie das Online-Video openconnect wrapper—What I learned building a Rust binary wrapper programming dealing with signals mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Steven Hé (Sīchàng) 17 Juli 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 59 Mal angesehen und es wurde von 0 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!