From: Matthew Daley <mattjd@gmail.com>
To: xen-devel@lists.xen.org
Cc: Matthew Daley <mattjd@gmail.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: [PATCH] xl: don't emit misleading daemon pid message
Date: Sun, 27 Oct 2013 19:49:14 +1300 [thread overview]
Message-ID: <1382856554-6353-1-git-send-email-mattjd@gmail.com> (raw)
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@gmail.com>
---
Perhaps the only other remaining `xl create` stdout message, 'Parsing config
from ...' could be removed too?
tools/libxl/xl_cmdimpl.c | 2 --
1 file changed, 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;
--
1.7.10.4
next reply other threads:[~2013-10-27 6:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-27 6:49 Matthew Daley [this message]
2013-10-28 15:56 ` [PATCH] xl: don't emit misleading daemon pid message Ian Jackson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1382856554-6353-1-git-send-email-mattjd@gmail.com \
--to=mattjd@gmail.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).