Hacker News new | past | comments | ask | show | jobs | submit login

I've seen this attitude before. In that specific case, someone tried to not depend on the signal_hook crate and manually (unsafely) implement signal handling… without knowing that there's a ton of pitfalls to it.

(The signal_hook crate even contains documentation on those pitfalls. https://docs.rs/signal-hook-registry/1.4.1/signal_hook_regis...)

I mean sure, reinvent the wheel. But it might do good to at least have an inkling what those 105 dependencies for your http listener did.




The person you are referring to was likely also me. I do not know of anyone other than me trying to code defensively against supply chain attacks in rust. It is a lonely corner.

I ended up going with sigwaitinfo since the attempts you likely saw on matrix which is perfect for my application that will only ever run on modern linux kernels.

Combining that with the stdlib health check above and we end up with a dead simple health checking signal handling service pattern that works well and easy to confirm is free of supply chain attacks.

https://dpaste.org/z1cAz


I should have recognized the username… (Is signal handling even required here?)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: