Re:fork() can fail
by dllthomas on Wednesday August 20, 2014 @04:57PM
(#8204566)
Well, it's a failure of the script and the POSIX API - it is unfortunate that a pid_t inhabited by -1 means "failure" in one case and "everything" in another. It is certainly not fork, narrowly, to blame.
[ Parent
| on HN ]
Re:fork() can fail
by M00n_Sl47r on Wednesday August 20, 2014 @06:05PM
(#8204931)
I think the point that the author was making, outside of any criticism to the API itself, is that the hapless programmer may not know that fork() could even return -1. The article is pointing out that possibility as documented by the API, not criticizing a failure of the API. Whether or not the API is faulty in this--and I tend to agree with you--is outside of the scope of the article, though only just.