Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
jimm
on Aug 20, 2014
|
parent
|
context
|
favorite
| on:
fork() can fail
Will it quit? A failed fork() will return -1, which is non-zero thus true in a boolean context. The while(fork()) {...} will run.
comex
on Aug 20, 2014
[–]
But it
will
stop when fork returns 0, i.e. in the child processes, making it non-exponential.
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: