News for hackers. Stuff that matters.
Re:Bugs Rust Won't Catch by nine_k on Wednesday April 29, 2026 @03:33AM (#47945210)
-1 is a special case, a way to represent a PID with all bits set in a platform-independent way. It's not very clean, and it comes from ancient times when writing some extra code and storing an extra few bytes was way more expensive.
Re:Bugs Rust Won't Catch by bonzini on Wednesday April 29, 2026 @06:42AM (#47946471)
No, -1 is simply the process group with pgid 1:

https://stackoverflow.com/questions/392022/whats-the-best-wa...

The problem is that -DIGIT doubles as both "signal number" and process group. The right way to invoke kill for a process group however would be "kill [OPTS]... -- -PGID".