Phillip Pearson - Second p0st: UNIX hackery: passing file descriptors

This is useful when writing network servers, because you can have a bunch of worker processes that accept socket descriptors that are passed from one 'master' server that accepts connections on a socket. Makes it easier to separate programs out, which can be good for security and performance.

Here's something from Kragen Sitaker that accepts socket connections then passes them off to another app for processing. The idea here is to make the program as secure as possible by minimising the amount of code that needs to run as the superuser.

真麻煩