[PATCH] server: Handle duplicate handles when inheriting them for the new process.