News for hackers. Stuff that matters.
Re:A future for fork(2) by geocar on Saturday October 06, 2018 @03:29AM (#18154007)
> The example given by the author seems risky to me

Ages ago I made a DNS server, and near the top of the program was a simple:

    for(i=0;i<ncpus;++i)if(!fork())break;
> Most use cases seem covered by either threads or fork+exec process spawning.

Most of the use cases of threads are covered by fork+explicit mmap/vm_remap.

A "shared-nothing" will also contain less code, and having no need for lock/unlock keeps a lot of spam invalidations away from the memory controller making it for many tasks faster.

> Even if you're safe from other threads, there is a lot of other unknown state like fd's still inherited.

The problems you get with threads are bigger.

http://geocar.sdf1.org/close.html

There are no comments on this comment yet.