[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...
En esta página del sitio puede ver el video en línea openconnect wrapper—What I learned building a Rust binary wrapper programming dealing with signals de Duración hora minuto segunda en buena calidad , que subió el usuario Steven Hé (Sīchàng) 17 julio 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 59 veces y le gustó 0 a los espectadores. Disfruta viendo!