Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In general I agree with your "don't blame the programmer" point, but I would seriously hesitate to criticize fork(). Yes, in 2014, that behavior seems uncommon and it seems like very poor design to lump such destructive behavior into an otherwise meaningless "-1"...

but remember that fork was not written in 2014. It was written forty-five years ago. I'm not saying it was a great API design decision back then, but I'm willing to bet that it seemed a lot less "wrong" at the time.



I think azinman2 was criticizing kill(), not fork(). It would make more sense to have a separate system call, something like killall().


You can criticise both, and more importantly criticise C for its inability to create sensible APIs: in a good design, fork() would have exclusive domains for a PID, an Error and a Child result and you couldn't confuse an error for a pid.


> criticise C for its inability to create sensible APIs

Where in the C manual is kill() described again?




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

Search: