Don't fork for xapian-tcpsrv --one-shot
commit4ae447e7382ff4983fe15d02663b28edc01d3479
authorOlly Betts <olly@survex.com>
Sat, 21 Apr 2018 23:18:17 +0000 (22 11:18 +1200)
committerOlly Betts <olly@survex.com>
Sat, 21 Apr 2018 23:18:17 +0000 (22 11:18 +1200)
tree7521d75783659e84aaed1c04b3c74d60a6e37b72
parentfc73ff0772017e55b35f276676287d4a22d3d4b6
Don't fork for xapian-tcpsrv --one-shot

We only need to fork so we can handle multiple concurrent connections,
which isn't a concern in this case, so forking just adds overhead and
potentially complicates process management for our caller.

This aligns with the behaviour under __WIN32__ where we use threads
instead of forking, and service the connection from the main thread with
--one-shot.
xapian-core/net/tcpserver.cc