qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: kvm-devel@lists.sourceforge.net, Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH 3/5] Fix daemonize options (v2)
Date: Mon,  4 Feb 2008 09:11:03 -0600	[thread overview]
Message-ID: <1202137865-20232-4-git-send-email-aliguori@us.ibm.com> (raw)
In-Reply-To: <1202137865-20232-1-git-send-email-aliguori@us.ibm.com>

The -daemonize option is too restrictive when using with SDL.  It also switches
the working directory to / too early which causes block devices with a relative
path to fail.

The -daemonize option is needed for my regression testing so I've included this
patch in the series.

This patch hasn't changed since v1.

diff --git a/vl.c b/vl.c
index 7dcddf3..28d6f6c 100644
--- a/vl.c
+++ b/vl.c
@@ -8757,11 +8757,6 @@ int main(int argc, char **argv)
     }
 
 #ifndef _WIN32
-    if (daemonize && !nographic && vnc_display == NULL) {
-	fprintf(stderr, "Can only daemonize if using -nographic or -vnc\n");
-	daemonize = 0;
-    }
-
     if (daemonize) {
 	pid_t pid;
 
@@ -8799,7 +8794,6 @@ int main(int argc, char **argv)
 	    exit(1);
 
 	umask(027);
-	chdir("/");
 
         signal(SIGTSTP, SIG_IGN);
         signal(SIGTTOU, SIG_IGN);
@@ -9065,6 +9059,7 @@ int main(int argc, char **argv)
 	if (len != 1)
 	    exit(1);
 
+	chdir("/");
 	TFR(fd = open("/dev/null", O_RDWR));
 	if (fd == -1)
 	    exit(1);

  parent reply	other threads:[~2008-02-04 15:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-04 15:11 [Qemu-devel] [PATCH 0/5] Support for the Kernel Virtual Machine interface (v3) Anthony Liguori
2008-02-04 15:11 ` [Qemu-devel] [PATCH 1/5] Use correct types to enable > 2G support (v3) Anthony Liguori
2008-02-04 15:29   ` [Qemu-devel] Re: [kvm-devel] " Izik Eidus
2008-02-04 15:33     ` Anthony Liguori
2008-02-04 15:43       ` Izik Eidus
2008-02-04 15:31   ` Anthony Liguori
2008-04-08 21:50   ` [Qemu-devel] " Aurelien Jarno
2008-04-09 19:52     ` [Qemu-devel] [PATCH 1/5] Use correct types toenable " Sebastian Herbszt
2008-02-04 15:11 ` [Qemu-devel] [PATCH 2/5] SCI fixes (v2) Anthony Liguori
     [not found]   ` <1211857519.14708.30.camel@bling>
     [not found]     ` <483C52D2.2080603@us.ibm.com>
     [not found]       ` <483CFB6D.3070302@qumranet.com>
     [not found]         ` <1211978270.14859.40.camel@bling>
     [not found]           ` <483D58C0.7060209@qumranet.com>
2008-05-28 21:50             ` [Qemu-devel] Re: [kvm] Re: [kvm-devel] " Alex Williamson
2008-02-04 15:11 ` Anthony Liguori [this message]
2008-02-04 15:11 ` [Qemu-devel] [PATCH 4/5] Tell BIOS about the number of CPUs (v2) Anthony Liguori
2008-02-04 15:11 ` [Qemu-devel] [PATCH 5/5] QEMU support for the Kernel Virtual Machine interface (v3) Anthony Liguori

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=1202137865-20232-4-git-send-email-aliguori@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=kvm-devel@lists.sourceforge.net \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).