This shows you the differences between two versions of the page.
— | blog:2022:06:04:2022-06-04_-_bash_and_raii_-_continued [2022/06/04 20:20] (current) – created basz | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 2022-06-04 - bash and RAII - continued ====== | ||
+ | couple days ago i wrote about [[: | ||
+ | |||
+ | <code bash> | ||
+ | # ... | ||
+ | function cleanup | ||
+ | { | ||
+ | rm -rf " | ||
+ | rm -fv / | ||
+ | umount / | ||
+ | } | ||
+ | trap cleanup EXIT | ||
+ | # ... | ||
+ | </ |