13
lorentz
109d

I love writing job control code

Comments
  • 1
    This is a scratchpad. Don't unwrap syscall stuff. It can almost always plausibly fail.
  • 0
    have you misspelled "prisoned"?
  • 0
    @Lensflare No, I put a child process in a mutex. The mutex might get poisoned if another thread panics while holding the lock. I cannot be assed to ensure panic safety, so panics just cascade across shared mutexes through checks like this one.
  • 1
    @lorentz I figured it should be prisoned because you locked it 😅
    I didn’t know about poisoning processes or mutexes (mutexi?).
  • 3
    @Lensflare I personally think it's mutices

    As far as I know, poisoning is a Rust-specific term, C++ and the broader community calls it unspecified or invalid state or something like that.

    I like the metaphor of poison, because it hammers in the idea that unless you can prove otherwise, touching anything coming out of a crashed process breaks the current process too.
Add Comment