Hi, Currently, vncviewer is spawned from xm, but it doesn''t properly get daemonized. The attached patch makes vncviewer run completely separate from xm. There are various reasons it should be daemonized, but the particular problem we hit was that YaST called "xm create" and waited on output on stdout/stderr; xm then spawned vncviewer (which never closed its inherited stdout and stderr); xm then would exit, but YaST still had open file descriptors, and therefore waited forever. It would be possible to work around in YaST, but it seemed cleaner to daemonize vncviewer. We''ve been running with a variant of this patch (a variant because we use tightvnc, which requires different arguments) for many months, and it works well. Please consider applying to xen-unstable. Thanks. Signed-off-by: Charles Coffing <ccoffing@novell.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
On 1 Aug 2006, at 20:11, Charles Coffing wrote:> We''ve been running with a variant of this patch (a variant because we > use tightvnc, which requires different arguments) for many months, and > it works well. > > Please consider applying to xen-unstable.Is there no Python library function that can do this (I couldn''t find one)? If not, can you at least put the new code in a function with a spawn-like interface (i.e., takes two parameters -- program name and program argument list). It''s okay to put the new function somewhere nearby in create.py. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Charles Coffing
2006-Aug-02 18:19 UTC
Re: [Xen-devel] [PATCH] properly daemonize vncviewer
On Wed, Aug 2, 2006 at 2:32 AM, Keir Fraser <Keir.Fraser@cl.cam.ac.uk> wrote:> On 1 Aug 2006, at 20:11, Charles Coffing wrote: > >> We''ve been running with a variant of this patch (a variant becausewe>> use tightvnc, which requires different arguments) for many months,and>> it works well. >> >> Please consider applying to xen- unstable. > > Is there no Python library function that can do this (I couldn''t find> one)?No. And as an added twist, I wanted to get the PID of the daemonized program back (without the mess or risk of writing to a temporary file) and I didn''t see any such thing out there already.> If not, can you at least put the new code in a function with a > spawn- like interface (i.e., takes two parameters -- program nameand> program argument list). It''s okay to put the new function somewhere > nearby in create.py.I''ve attached the updated patch with the suggested changes. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel