Detegr / rust-ctrlc

Easy Ctrl-C handler for Rust projects
https://crates.io/crates/ctrlc
Other
599 stars 79 forks source link

Reset DONE status after a successful wait #4

Closed dagit closed 9 years ago

dagit commented 9 years ago

This appears to fix #3. I'm not sure, but it might also cause some signals to get dropped? Also I'm not sure what Ordering to use for this so I used Relaxed because that's what the reads/writes to DONE use.

So far I've only tested it in linux, but I hope to test it in windows too.

dagit commented 9 years ago

I tested this in windows. It works correctly from cmd.exe. In the mingw shell it runs the handler once but my program also exits. I think it's pretty typical to support either cmd.exe or mingw shell and not both. So I would say it's "correct" for now.

Detegr commented 9 years ago

This is good, thanks! This bug had slipped in when fixing issue #1.