All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hanna Reitz <hreitz@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH 2/3] qsd: Add --daemonize
Date: Mon, 3 Jan 2022 18:15:44 +0100	[thread overview]
Message-ID: <5918a7a8-059c-381f-b124-d99cf456a138@redhat.com> (raw)
In-Reply-To: <cd049715-f17c-d605-00db-1bdc75944fb5@virtuozzo.com>

On 30.12.21 17:12, Vladimir Sementsov-Ogievskiy wrote:
> 22.12.2021 14:41, Hanna Reitz wrote:
>> This option does basically the same as --fork does for qemu-nbd:
>
> Can we share the code?
>
> Before this patch we already have --fork code-path of qemu-nbd and 
> -daemonize code-path of QEMU.. Now we have one more. Did you consider 
> improving and sharing the old code instead?

I didn’t really, to be honest.  I disliked sharing code with qemu-nbd, 
because, well, that would mean touching qemu-nbd (which I’d rather 
avoid).  Then again, I suppose we could theoretically just drop the 
daemonizing code from qemu-nbd, and replace it by calls to daemonize() 
and daemon_detach().  The only problem with that would be that we need 
some file into which to put it, that is linked into both qemu-nbd and 
the QSD.

QEMU proper already has os_daemonize() and os_setup_post(), but they’re 
quite different from what qemu-nbd does, for example, it doesn’t call 
qemu_daemon(), and it chdir()s to / (which we probably don’t want?).

I preferred to go with what qemu-nbd does, because I thought if it works 
for qemu-nbd, it should work for QSD, too.  Maybe I’m wrong, though, 
maybe we should just use os_daemonize() and os_setup_post().

Hanna



  reply	other threads:[~2022-01-03 17:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-22 11:41 [PATCH 0/3] qsd: Add --daemonize; and add job quit tests Hanna Reitz
2021-12-22 11:41 ` [PATCH 1/3] qsd: Add pre-init argument parsing pass Hanna Reitz
2021-12-30 16:00   ` Vladimir Sementsov-Ogievskiy
2022-01-03 16:14     ` Hanna Reitz
2022-01-19 12:58   ` Markus Armbruster
2022-01-19 13:44     ` Hanna Reitz
2022-01-19 17:21       ` Kevin Wolf
2022-01-20 16:00         ` Markus Armbruster
2022-01-20 16:31           ` Hanna Reitz
2022-01-21  6:10             ` Markus Armbruster
2022-01-21  8:43               ` Hanna Reitz
2022-01-21 10:27                 ` Markus Armbruster
2022-01-21 11:16                   ` Hanna Reitz
2022-01-21 14:26                     ` Markus Armbruster
2022-01-24  8:20                       ` Hanna Reitz
2022-01-24  9:23                         ` Markus Armbruster
2022-01-24  9:34                           ` Hanna Reitz
2021-12-22 11:41 ` [PATCH 2/3] qsd: Add --daemonize Hanna Reitz
2021-12-30 16:12   ` Vladimir Sementsov-Ogievskiy
2022-01-03 17:15     ` Hanna Reitz [this message]
2021-12-22 11:41 ` [PATCH 3/3] iotests/185: Add post-READY quit tests Hanna Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5918a7a8-059c-381f-b124-d99cf456a138@redhat.com \
    --to=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.