xrdp: fix --kill
This commit is contained in:
parent
fd793bd213
commit
418637f72d
66
xrdp/xrdp.c
66
xrdp/xrdp.c
@ -401,39 +401,6 @@ main(int argc, char **argv)
|
|||||||
g_exit(0);
|
g_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* starting logging subsystem */
|
|
||||||
error = log_start(cfg_file, "XRDP");
|
|
||||||
|
|
||||||
if (error != LOG_STARTUP_OK)
|
|
||||||
{
|
|
||||||
switch (error)
|
|
||||||
{
|
|
||||||
case LOG_ERROR_MALLOC:
|
|
||||||
g_writeln("error on malloc. cannot start logging. quitting.");
|
|
||||||
break;
|
|
||||||
case LOG_ERROR_FILE_OPEN:
|
|
||||||
g_writeln("error opening log file [%s]. quitting.",
|
|
||||||
getLogFile(text, 255));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
g_writeln("log_start error");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_deinit();
|
|
||||||
g_exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (g_file_exist(pid_file)) /* xrdp.pid */
|
|
||||||
{
|
|
||||||
g_writeln("It looks like xrdp is allready running,");
|
|
||||||
g_writeln("if not delete the xrdp.pid file and try again");
|
|
||||||
g_deinit();
|
|
||||||
g_exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (startup_params->kill)
|
if (startup_params->kill)
|
||||||
{
|
{
|
||||||
g_writeln("stopping xrdp");
|
g_writeln("stopping xrdp");
|
||||||
@ -469,6 +436,39 @@ main(int argc, char **argv)
|
|||||||
g_exit(0);
|
g_exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* starting logging subsystem */
|
||||||
|
error = log_start(cfg_file, "XRDP");
|
||||||
|
|
||||||
|
if (error != LOG_STARTUP_OK)
|
||||||
|
{
|
||||||
|
switch (error)
|
||||||
|
{
|
||||||
|
case LOG_ERROR_MALLOC:
|
||||||
|
g_writeln("error on malloc. cannot start logging. quitting.");
|
||||||
|
break;
|
||||||
|
case LOG_ERROR_FILE_OPEN:
|
||||||
|
g_writeln("error opening log file [%s]. quitting.",
|
||||||
|
getLogFile(text, 255));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
g_writeln("log_start error");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_deinit();
|
||||||
|
g_exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (g_file_exist(pid_file)) /* xrdp.pid */
|
||||||
|
{
|
||||||
|
g_writeln("It looks like xrdp is allready running,");
|
||||||
|
g_writeln("if not delete the xrdp.pid file and try again");
|
||||||
|
g_deinit();
|
||||||
|
g_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
if (startup_params->no_daemon)
|
if (startup_params->no_daemon)
|
||||||
{
|
{
|
||||||
no_daemon = 1;
|
no_daemon = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user