[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xl: don't emit misleading daemon pid message



commit 2cd1f418feb215c379b6737576b53bba6f70c1a6
Author:     Matthew Daley <mattjd@xxxxxxxxx>
AuthorDate: Sun Oct 27 19:49:14 2013 +1300
Commit:     Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
CommitDate: Mon Oct 28 15:54:45 2013 +0000

    xl: don't emit misleading daemon pid message
    
    After creating a domain, xl forks off a process to handle domain events
    (shutdown, disk eject, ...). It prints out the pid of the process
    created by the fork to stdout. However, the newly forked process soon
    after calls daemon(), which itself forks once more (and exit()s the
    original process). This means that the pid printed out is not the pid of
    the actual process which remains in the background after all is said and
    done, instead it is the pid of the transient process that exists between
    xl's fork() and the fork'd process's daemon() call.
    
    We could resolve this by printing the correct pid, ie. by open-coding
    daemon() (we already do most of the heavy lifting it does ourselves by
    fiddling with the standard fds). However, since no-one seems to be
    complaining about the misleading message to begin with, and since it
    seems like a pointless message anyway, just remove it outright instead.
    
    Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
    Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c
index a8261be..fddaa80 100644
--- a/tools/libxl/xl_cmdimpl.c
+++ b/tools/libxl/xl_cmdimpl.c
@@ -2140,8 +2140,6 @@ start:
 
         child1 = xl_fork(child_waitdaemon);
         if (child1) {
-            printf("Daemon running with PID %d\n", child1);
-
             for (;;) {
                 got_child = xl_waitpid(child_waitdaemon, &status, 0);
                 if (got_child == child1) break;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.