Improve xrdp-sesman help text

Don't document "-ns", as "-n" and "--nodaemon" should be enough. Always
refer to the program as xrdp-sesman, not sesman.
master
Pavel Roskin 7 years ago
parent b1c0a7be04
commit 0a9b586332

@ -130,6 +130,19 @@ sesman_main_loop(void)
g_tcp_close(g_sck);
}
/******************************************************************************/
void
print_usage(int retcode)
{
g_printf("xrdp-sesman - xrdp session manager\n\n");
g_printf("Usage: xrdp-sesman [options]\n");
g_printf(" -n, --nodaemon run as foreground process\n");
g_printf(" -k, --kill kill running xrdp-sesman\n");
g_printf(" -h, --help show this help\n");
g_deinit();
g_exit(retcode);
}
/******************************************************************************/
int DEFAULT_CC
main(int argc, char **argv)
@ -166,16 +179,7 @@ main(int argc, char **argv)
(0 == g_strcasecmp(argv[1], "-help")) ||
(0 == g_strcasecmp(argv[1], "-h"))))
{
/* help screen */
g_printf("sesman - xrdp session manager\n\n");
g_printf("usage: sesman [command]\n\n");
g_printf("command can be one of the following:\n");
g_printf("-n, -ns, --nodaemon starts sesman in foreground\n");
g_printf("-k, --kill kills running sesman\n");
g_printf("-h, --help shows this help\n");
g_printf("if no command is specified, sesman is started in background");
g_deinit();
g_exit(0);
print_usage(0);
}
else if ((2 == argc) && ((0 == g_strcasecmp(argv[1], "--kill")) ||
(0 == g_strcasecmp(argv[1], "-kill")) ||
@ -229,16 +233,13 @@ main(int argc, char **argv)
else
{
/* there's something strange on the command line */
g_printf("sesman - xrdp session manager\n\n");
g_printf("error: invalid command line\n");
g_printf("usage: sesman [ --nodaemon | --kill | --help ]\n");
g_deinit();
g_exit(1);
g_printf("Error: invalid command line arguments\n\n");
print_usage(1);
}
if (g_file_exist(pid_file))
{
g_printf("sesman is already running.\n");
g_printf("xrdp-sesman is already running.\n");
g_printf("if it's not running, try removing ");
g_printf("%s", pid_file);
g_printf("\n");

Loading…
Cancel
Save