Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
lorentz15183139dThis is a scratchpad. Don't unwrap syscall stuff. It can almost always plausibly fail.
-
lorentz15183139d@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.
-
Lensflare17462139d@lorentz I figured it should be prisoned because you locked it 😅
I didn’t know about poisoning processes or mutexes (mutexi?). -
lorentz15183139d@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.
Related Rants
I love writing job control code
rant
child poisoned
rust