qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [4924] Fix -daemonize option
@ 2008-07-23  0:58 Anthony Liguori
  0 siblings, 0 replies; only message in thread
From: Anthony Liguori @ 2008-07-23  0:58 UTC (permalink / raw)
  To: qemu-devel

Revision: 4924
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4924
Author:   aliguori
Date:     2008-07-23 00:58:33 +0000 (Wed, 23 Jul 2008)

Log Message:
-----------
Fix -daemonize option

When using -daemonize, we want to avoid chdir() until after we've opened the
block devices.  It's also perfectly fine to use -dameonize along with SDL.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

Modified Paths:
--------------
    trunk/vl.c

Modified: trunk/vl.c
===================================================================
--- trunk/vl.c	2008-07-22 07:07:34 UTC (rev 4923)
+++ trunk/vl.c	2008-07-23 00:58:33 UTC (rev 4924)
@@ -8626,11 +8626,6 @@
     }
 
 #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;
 
@@ -8668,7 +8663,6 @@
 	    exit(1);
 
 	umask(027);
-	chdir("/");
 
         signal(SIGTSTP, SIG_IGN);
         signal(SIGTTOU, SIG_IGN);
@@ -8974,6 +8968,7 @@
 	if (len != 1)
 	    exit(1);
 
+	chdir("/");
 	TFR(fd = open("/dev/null", O_RDWR));
 	if (fd == -1)
 	    exit(1);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-07-23  0:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-23  0:58 [Qemu-devel] [4924] Fix -daemonize option Anthony Liguori

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).