1. 24
  1.  

    1. 3

      Would using https://crates.io/crates/signal-hook fix the signal-related CVE?

      1. 5

        That, or Tokio’s signal support. In general if your signal handler is more complicated than a single-byte write to a self-pipe (link to my blog post) it’s probably worth revising.

        But then you have to think about how to handle those writes on the other end, and that’s where Tokio/async Rust can really help. Here’s a document I wrote about how nextest does quite complex signal handling — apologies for linking to my own post again, but I’ve worked extensively in this area.

        1. 4

          That crate seems to at least implement its own method to avoid allocations and use a different register call while performing no println!() ? In any case it comes from a known member of the community/compiler and has had more eyes to it.