From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KIwXN-0005Sq-G1 for qemu-devel@nongnu.org; Tue, 15 Jul 2008 22:14:37 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KIwXL-0005SD-Sn for qemu-devel@nongnu.org; Tue, 15 Jul 2008 22:14:36 -0400 Received: from [199.232.76.173] (port=39188 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KIwXL-0005S8-J5 for qemu-devel@nongnu.org; Tue, 15 Jul 2008 22:14:35 -0400 Received: from wf-out-1314.google.com ([209.85.200.168]:1905) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KIwXL-0006DL-8f for qemu-devel@nongnu.org; Tue, 15 Jul 2008 22:14:35 -0400 Received: by wf-out-1314.google.com with SMTP id 27so5538968wfd.4 for ; Tue, 15 Jul 2008 19:14:34 -0700 (PDT) Message-ID: <487D5984.7080103@quinthar.com> Date: Tue, 15 Jul 2008 19:14:28 -0700 From: David Barrett MIME-Version: 1.0 Subject: Re: [Qemu-devel] Setting new user:group with -daemonize? References: <487D2E27.1060809@quinthar.com> <487D515A.90903@codemonkey.ws> In-Reply-To: <487D515A.90903@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Anthony Liguori wrote: > David Barrett wrote: >> >> I'd update the -daemonize syntax as follows: >> >> -daemonize [user[:group]] >> >> Is there any interest in such a patch? > > If you introduced two new options to specify the user and the group. Ok, so you're saying you prefer two new options: -user -group > Also, I would be interested in a chroot option too :-) Adding the following also seems easy enough: -chroot If I build it, any estimate of how long it'd take to make it into the next mainline release? >> PS: Why does it fork twice? > > It makes sure QEMU is an orphan process (it's parent is pid 1). It's a > pretty typical thing to do when daemonizing. Ah, very clever. -david