Use -M parameter instead of --manpath when invoking man(1)
authorRicardo Nabinger Sanchez <rnsanchez@gmail.com>
Thu, 25 Aug 2016 19:57:46 +0000 (15:57 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 25 Aug 2016 20:04:37 +0000 (16:04 -0400)
Older versions of man (and the implementation used in FreeBSD) do
not support the long version of the --manpath/-M option. Use
'-M' in the interest of portability.

Fixes #1043

Signed-off-by: Ricardo Nabinger Sanchez <rnsanchez@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/utils.c

index 1e52ae0aa073640a34f8b035376bb6b5119d5660..16d2f817ad8a1b21d99228a67e5bba25e0d1f3fa 100644 (file)
@@ -1375,11 +1375,11 @@ int utils_show_man_page(int section, const char *page_name)
        /*
         * Execute man pager.
         *
-        * We provide --manpath to man here because LTTng-tools can
+        * We provide -M to man here because LTTng-tools can
         * be installed outside /usr, in which case its man pages are
         * not located in the default /usr/share/man directory.
         */
-       ret = execlp(man_bin_path, "man", "--manpath", MANPATH,
+       ret = execlp(man_bin_path, "man", "-M", MANPATH,
                section_string, page_name, NULL);
        return ret;
 }
This page took 0.025835 seconds and 4 git commands to generate.