Really? I thought this simplest approach - have a number of threads or
even independent processes which all do accept() themselves - is not
done because of the thundering herds problem.
I think the reason is this: you can't bind more than one socket to an
address to listen on, so all processes share the same listening FD
(dup() wouldn't help because it just creates a new reference to the
same socket.) When this FD becomes ready, all processes waiting on it
get woken up.
Olaf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/