[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] [PATCH] nbd-server: add -D/-dont-daemonize option

Wouter Verhelst <w@...112...> writes:

> On Mon, Jun 25, 2012 at 03:22:06PM +0400, Dmitry V. Levin wrote:
>> On Mon, Jun 25, 2012 at 11:59:44AM +0200, Goswin von Brederlow wrote:
>> > What I would like to see is socket activation in nbd-server. That way
>> > the service can be started as needed without performance loss (other
>> > than the initial startup time once).
>> That shouldn't be a problem because nbd-server supports inetd mode.
> NAK. In inetd mode, name-based exports are not currently supported.
> This could be fixed, I suppose, but I'm not sure I want to continue
> supporting inetd mode. It's fairly difficult to debug and test, which
> means there've been a number of bugs in the past that I didn't notice.

Have a look at the system socket activation. For example 


about half way down has some example source code. Since you still go
into normal daemon mode there is no overhead to support this other than
those few lines.


Reply to: