News for hackers. Stuff that matters.
Re:fork() can fail by cperciva on Wednesday August 20, 2014 @04:04PM (#8204260)
Sure, you could have pid = fork(); switch (pid) if you prefer. I find that the inline assignment-and-condition style is clearer since it reads to me as "switch on the result of fork, and cache that value somewhere" whereas the separate statements read to me as "call fork" and "switch on the process ID".

There are no comments on this comment yet.