WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH] open xend-debug.log with O_APPEND

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] open xend-debug.log with O_APPEND
From: John Levon <levon@xxxxxxxxxxxxxxxxx>
Date: 2006年10月24日 22:34:39 +0100
Delivery-date: 2006年10月24日 14:34:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
# HG changeset patch
# User john.levon@xxxxxxx
# Date 1161724855 25200
# Node ID 35cf7e0d5ba301b611713d95b8f863c20beb12db
# Parent d9391864ed0e6727a204cfdbabdbaa6d00379f53
As spotted by Daniel Berrange, we must open xend-debug.log in append mode,
otherwise a restart will write to the beginning of the log, making tail -f
useless.
Signed-off-by: John Levon <john.levon@xxxxxxx>
diff --git a/tools/python/xen/xend/server/SrvDaemon.py 
b/tools/python/xen/xend/server/SrvDaemon.py
--- a/tools/python/xen/xend/server/SrvDaemon.py
+++ b/tools/python/xen/xend/server/SrvDaemon.py
@@ -106,12 +106,12 @@ class Daemon:
 os.close(2)
 if XEND_DEBUG:
 os.open('/dev/null', os.O_RDONLY)
- os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT)
+ os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND)
 os.dup(1)
 else:
 os.open('/dev/null', os.O_RDWR)
 os.dup(0)
- os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT)
+ os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND)
 
 
 def start(self, trace=0):
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] open xend-debug.log with O_APPEND, John Levon <=
Previous by Date: Re: [Xen-devel] Can I use xc_map_foreign_range() on a paused domain? , Randy Thelen
Next by Date: [Xen-devel] RE: double invoke of hvm_do_resume , Dong, Eddie
Previous by Thread: [Xen-devel] Testing status of HVM (Intel VT) on 64bit XEN unstable c/s 11870 , Ed Smith
Next by Thread: [Xen-devel] RE: double invoke of hvm_do_resume , Dong, Eddie
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /