summaryrefslogtreecommitdiffstats
path: root/sesman
diff options
context:
space:
mode:
authorKoichiro IWAO <meta@vmeta.jp>2018-05-30 04:10:06 +0900
committerKoichiro IWAO <meta@vmeta.jp>2018-06-05 00:19:36 +0900
commit6ae3052a0f0c87393977264f9d19f168e4bfe02a (patch)
tree0dbe5272b79e14b6d4e680c8d114a933c4d20d06 /sesman
parent19fa26a27ebf9e1294a7b242ec34d089ee4580a2 (diff)
downloadxrdp-proprietary-6ae3052a0f0c87393977264f9d19f168e4bfe02a.tar.gz
xrdp-proprietary-6ae3052a0f0c87393977264f9d19f168e4bfe02a.zip
sesman: don't spit on the console when starting
As the Debian patch[1] expresses, spitting messages on the console when a process starts in background is a bad idea. Everything should be written to log file and daemon should start silently. This is a first step to shut up daemons. Got some idea from Debian Remote Maintainers and Thorsten Glaser, thanks! [1] https://salsa.debian.org/debian-remote-team/xrdp/blob/2751ad4d62b1f63dbc2e4b8fa1580fa54b0f5460/debian/patches/shutup-daemon.diff
Diffstat (limited to 'sesman')
-rw-r--r--sesman/sesman.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sesman/sesman.c b/sesman/sesman.c
index a89d2f55..8abdc4ac 100644
--- a/sesman/sesman.c
+++ b/sesman/sesman.c
@@ -209,8 +209,7 @@ main(int argc, char **argv)
if (1 == argc)
{
- /* no options on command line. normal startup */
- g_printf("starting sesman...\n");
+ /* start in daemon mode if no cli options */
daemon = 1;
}
else if ((2 == argc) && ((0 == g_strcasecmp(argv[1], "--nodaemon")) ||
@@ -312,6 +311,12 @@ main(int argc, char **argv)
g_exit(1);
}
+ /* not to spit on the console, show config summary only when running in foreground */
+ if (!daemon)
+ {
+ config_dump(g_cfg);
+ }
+
g_snprintf(cfg_file, 255, "%s/sesman.ini", XRDP_CFG_PATH);
/* starting logging subsystem */