3 ms·
Samba uses fork to create new instances of itself to handle each connected user, and I am often grateful that it does that instead of using threads. Since each
by gcv 17y ago
Samba uses fork to create new instances of itself to handle each connected user, and I am often grateful that it does that instead of using threads. Since each user has a separate process, something going wrong inside the process means that the process dumps core, but none of the other users ever notice. Even the user whose smbd process crashed doesn't notice much except a brief delay while he reconnects.
No real need to monitor (except to try to catch the bug that caused the crash in the first place), and no need to manually restart anything. It all just keeps going.
Basically, a server process using fork has a lot of resilience built in. In contrast, a crash in a threaded process will kill all the threads at once, and all users feel the pain.