The "-P" command line option just results in printing the PID of the
xenstored daemon to stdout before stdout is being closed. The same
information can be retrieved from the PID file via the "-F" option.

Remove the redundant "-P" option.

Signed-off-by: Juergen Gross <[email protected]>
Reviewed-by: Julien Grall <[email protected]>
---
 tools/xenstored/core.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/tools/xenstored/core.c b/tools/xenstored/core.c
index 194e24238b..3ce50b313b 100644
--- a/tools/xenstored/core.c
+++ b/tools/xenstored/core.c
@@ -2653,7 +2653,6 @@ static void usage(void)
 "  -F, --pid-file <file>   giving a file for the daemon's pid to be written,\n"
 "  -H, --help              to output this message,\n"
 "  -N, --no-fork           to request that the daemon does not fork,\n"
-"  -P, --output-pid        to request that the pid of the daemon is output,\n"
 "  -T, --trace-file <file> giving the file for logging, and\n"
 "      --trace-control=+<switch> activate a specific <switch>\n"
 "      --trace-control=-<switch> deactivate a specific <switch>\n"
@@ -2702,7 +2701,6 @@ static struct option options[] = {
        { "help", 0, NULL, 'H' },
        { "no-fork", 0, NULL, 'N' },
        { "priv-domid", 1, NULL, 'p' },
-       { "output-pid", 0, NULL, 'P' },
        { "entry-size", 1, NULL, 'S' },
        { "trace-file", 1, NULL, 'T' },
        { "trace-control", 1, NULL, 1 },
@@ -2825,7 +2823,6 @@ int main(int argc, char *argv[])
        int opt;
        int sock_pollfd_idx = -1;
        bool dofork = true;
-       bool outputpid = false;
        bool live_update = false;
        const char *pidfile = NULL;
        int timeout;
@@ -2834,7 +2831,7 @@ int main(int argc, char *argv[])
        orig_argv = argv;
 
        while ((opt = getopt_long(argc, argv,
-                                 "E:F:H::KNPS:t:A:M:Q:q:T:RW:w:U",
+                                 "E:F:H::KNS:t:A:M:Q:q:T:RW:w:U",
                                  options, NULL)) != -1) {
                switch (opt) {
                case 'E':
@@ -2849,9 +2846,6 @@ int main(int argc, char *argv[])
                case 'N':
                        dofork = false;
                        break;
-               case 'P':
-                       outputpid = true;
-                       break;
                case 'R':
                        recovery = false;
                        break;
@@ -2947,11 +2941,6 @@ int main(int argc, char *argv[])
                dom0_init();
        }
 
-       if (outputpid) {
-               printf("%ld\n", (long)getpid());
-               fflush(stdout);
-       }
-
        /* redirect to /dev/null now we're ready to accept connections */
        if (dofork && !live_update)
                finish_daemonize();
-- 
2.35.3


Reply via email to