[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [4924] Fix -daemonize option
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [4924] Fix -daemonize option |
Date: |
Wed, 23 Jul 2008 00:58:34 +0000 |
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 <address@hidden>
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-devel] [4924] Fix -daemonize option,
Anthony Liguori <=