This pull requests addresses #132 by adding the new option -n/--nodaemon to nbd-server. When set, it keeps the main process in the foreground, while still allowing to fork the serving process for a client. Functionally, it should be equivalent to providing NODAEMON to the preprocessor.
The commit also fixes a minor inaccuracy in the usage() function, which wrongly stated that the long option of -M is --max-connections (with trailing 's'). While conceptually unrelated, I've still included it as it's a trivial fix; let me know in case I should take it out.
I should note that I'm completely new to the nbd codebase, thus hoping I didn't miss anything relevant. Did some manual testing though (using live ebuild on Gentoo + patch to build it and then playing around with a few client connections) and it seems to work fine.
This pull requests addresses #132 by adding the new option -n/--nodaemon to nbd-server. When set, it keeps the main process in the foreground, while still allowing to fork the serving process for a client. Functionally, it should be equivalent to providing NODAEMON to the preprocessor.
The commit also fixes a minor inaccuracy in the usage() function, which wrongly stated that the long option of -M is --max-connections (with trailing 's'). While conceptually unrelated, I've still included it as it's a trivial fix; let me know in case I should take it out.
I should note that I'm completely new to the nbd codebase, thus hoping I didn't miss anything relevant. Did some manual testing though (using live ebuild on Gentoo + patch to build it and then playing around with a few client connections) and it seems to work fine.