Re: [Nbd] [PATCH] nbd-server: add -D/-dont-daemonize option
- To: nbd-general@lists.sourceforge.net
- Subject: Re: [Nbd] [PATCH] nbd-server: add -D/-dont-daemonize option
- From: Goswin von Brederlow <goswin-v-b@...186...>
- Date: Thu, 28 Jun 2012 10:33:01 +0200
- Message-id: <8762abn8ea.fsf@...860...>
- In-reply-to: <20120627230038.GB7082@...3...> (Wouter Verhelst's message of "Thu, 28 Jun 2012 01:00:38 +0200")
- References: <20120624230358.GA28298@...1147...> <87pq8n1zlb.fsf@...860...> <20120625112206.GA1518@...1147...> <20120627230038.GB7082@...3...>
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
http://0pointer.de/blog/projects/socket-activation.html
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.
MfG
Goswin
Reply to: