rpms/libvirt/F-8 libvirt-0.4.1-daemon-startup.patch, NONE, 1.1 libvirt.spec, 1.73, 1.74
Daniel Veillard (veillard)
fedora-extras-commits at redhat.com
Tue Mar 11 10:29:03 UTC 2008
Author: veillard
Update of /cvs/pkgs/rpms/libvirt/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31534
Modified Files:
libvirt.spec
Added Files:
libvirt-0.4.1-daemon-startup.patch
Log Message:
Fix from danpb to fix the iptables startup error, Daniel
libvirt-0.4.1-daemon-startup.patch:
--- NEW FILE libvirt-0.4.1-daemon-startup.patch ---
diff -rup libvirt-0.4.1.orig/qemud/qemud.c libvirt-0.4.1.new/qemud/qemud.c
--- libvirt-0.4.1.orig/qemud/qemud.c 2008-03-10 17:31:09.000000000 -0400
+++ libvirt-0.4.1.new/qemud/qemud.c 2008-03-10 17:31:36.000000000 -0400
@@ -393,7 +393,7 @@ static int qemudGoDaemon(void) {
case -1:
return -1;
default:
- return nextpid;
+ _exit(0);
}
cleanup:
@@ -418,8 +418,7 @@ static int qemudGoDaemon(void) {
status != 0) {
return -1;
}
-
- return pid;
+ _exit(0);
}
}
}
@@ -2116,16 +2115,12 @@ int main(int argc, char **argv) {
goto error1;
if (godaemon) {
- int pid;
openlog("libvirtd", 0, 0);
- pid = qemudGoDaemon();
- if (pid < 0) {
+ if (qemudGoDaemon() < 0) {
qemudLog(QEMUD_ERR, _("Failed to fork as daemon: %s"),
strerror(errno));
goto error1;
}
- if (pid > 0)
- goto out;
/* Choose the name of the PID file. */
if (!pid_file) {
@@ -2172,7 +2167,6 @@ int main(int argc, char **argv) {
if (godaemon)
closelog();
- out:
ret = 0;
error2:
Index: libvirt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt/F-8/libvirt.spec,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- libvirt.spec 6 Mar 2008 10:17:31 -0000 1.73
+++ libvirt.spec 11 Mar 2008 10:28:30 -0000 1.74
@@ -27,6 +27,7 @@
Source: libvirt-%{version}.tar.gz
Patch0: libvirt-0.4.1-qemud1.patch
Patch1: libvirt-0.4.1-qemud2.patch
+Patch2: libvirt-0.4.1-daemon-startup.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://libvirt.org/
BuildRequires: python python-devel
@@ -140,6 +141,7 @@
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
# Xen is available only on i386 x86_64 ia64
@@ -280,6 +282,9 @@
%doc docs/examples/python
%changelog
+* Tue Mar 11 2008 Daniel Veillard <veillard at redhat.com> - 0.4.1-2.fc8
+- Fixed daemon startup when run with --daemon flag
+
* Thu Mar 6 2008 Daniel Veillard <veillard at redhat.com> - 0.4.1-1.fc8
- Update to 0.4.1
- Storage APIs
More information about the fedora-extras-commits
mailing list