sudo-rs icon indicating copy to clipboard operation
sudo-rs copied to clipboard

Avoid `exit`

Open pvdrz opened this issue 2 years ago • 0 comments
trafficstars

I'm just paraphrasing @rnijveld here so we don't forget about this:

Several parts of sudo, like PAM or the use_pty code, need to do some clean-up before exiting. But the sudo-exec crate calls exit which effectively ends the main sudo process and does not let the clean-up code run so we should fix this behavior to avoid issues in the future.

The only unresolved question I have about this is how signal handling should be done considering that we shouldn't just terminate execution without running this clean-up phase. Should we modify how signals are handled to guarantee that the clean-up is still done?

pvdrz avatar May 07 '23 09:05 pvdrz