openconnect wrapper—What I learned building a Rust binary wrapper programming dealing with signals

Publicado em: 17 Julho 2022
no canal de: Steven Hé (Sīchàng)
59
0

[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...


Nesta página do site você pode assistir ao vídeo on-line openconnect wrapper—What I learned building a Rust binary wrapper programming dealing with signals duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Steven Hé (Sīchàng) 17 Julho 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 59 vezes e gostou 0 espectadores. Boa visualização!