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

Pubblicato il: 17 luglio 2022
sul canale di: 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...


In questa pagina del sito puoi guardare il video online openconnect wrapper—What I learned building a Rust binary wrapper programming dealing with signals della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Steven Hé (Sīchàng) 17 luglio 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 59 volte e gli è piaciuto 0 spettatori. Buona visione!