From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] tools: xl: add option to run in foreground but still monitor for reboot etc Date: Mon, 28 Jan 2013 16:22:32 +0100 Message-ID: <20130128152232.GA16292@aepfle.de> References: <1304521205.26692.32.camel@zakaz.uk.xensource.com> <6f20fdf37a97db6ff6ce.1304523365@cosworth.uk.xensource.com> <1304685658.26692.156.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1304685658.26692.156.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org Ian, the xl migrate command gets a new option -F with this change. Is it intentional? The "monitor" variable is not used in this part of the patch. It got applied in changeset 23350:f531ed84b066 Olaf On Fri, May 06, Ian Campbell wrote: > On Wed, 2011-05-04 at 16:36 +0100, Ian Campbell wrote: > > # HG changeset patch > > # User Ian Campbell > > # Date 1304523348 -3600 > > # Node ID 6f20fdf37a97db6ff6ce4690057b8fd6662582f5 > > # Parent f033c864926375fd545af71a2f0229c00c4354a7 > > tools: xl: add option to run in foreground but still monitor for reboot etc > > v3 updated for 23299:39f2942fe56b "xl: refactor common parts of command > line parsing" > > 8<---------------------- > > # HG changeset patch > # User Ian Campbell > # Date 1304685600 -3600 > # Node ID c0d309593d78b3e7340b805f95330249e7142169 > # Parent 94ddef3d9f45fa36aa076a164dfbfa04c09eeb85 > tools: xl: add option to run in foreground but still monitor for reboot etc > > Split daemonization option out from monitoring a domain for reboot > etc. The 'e' option continues to disable both and a new 'F'(oreground) > option disables only daemonization. > > When I'm debugging xl in the foreground this is often the behaviour I > would like. > @@ -2864,9 +2877,9 @@ int main_migrate(int argc, char **argv) > const char *ssh_command = "ssh"; > char *rune = NULL; > char *host; > - int opt, daemonize = 1, debug = 0; > - > - while ((opt = def_getopt(argc, argv, "C:s:ed", "migrate", 2)) != -1) { > + int opt, daemonize = 1, monitor = 1, debug = 0; > + > + while ((opt = def_getopt(argc, argv, "FC:s:ed", "migrate", 2)) != -1) { > switch (opt) { > case 0: case 2: > return opt; > @@ -2876,8 +2889,12 @@ int main_migrate(int argc, char **argv) > case 's': > ssh_command = optarg; > break; > + case 'F': > + daemonize = 0; > + break; > case 'e': > daemonize = 0; > + monitor = 0; > break; > case 'd': > debug = 1;