Hacker News new | past | comments | ask | show | jobs | submit login

Yes, that's what you're supposed to do, and it sucks. A good library should provide you with more than a box full of hammers and thumbs; it should actually help you and not just punt whenever a hard decision shows up. The RAND interface was one of the first things gutted.

The presence or need for a stir() function should be considered a serious design flaw.

(forks are detected by calling getpid() if you don't have inheritzero.)

Agreed, but the lack of a random syscall on Linux makes an API like stir necessary.

Also, getpid() isn't airtight - if you fork and fork again there's a risk of PID wraparound.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact