|
|
@ -342,9 +342,18 @@ main(int argc, char **argv)
|
|
|
|
g_exit(1);
|
|
|
|
g_exit(1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (daemon)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
/* not to spit on the console, shut up stdout/stderr before anything's logged */
|
|
|
|
|
|
|
|
g_file_close(0);
|
|
|
|
|
|
|
|
g_file_close(1);
|
|
|
|
|
|
|
|
g_file_close(2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* libscp initialization */
|
|
|
|
/* libscp initialization */
|
|
|
|
scp_init();
|
|
|
|
scp_init();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (daemon)
|
|
|
|
if (daemon)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* start of daemonizing code */
|
|
|
|
/* start of daemonizing code */
|
|
|
@ -363,10 +372,6 @@ main(int argc, char **argv)
|
|
|
|
g_exit(0);
|
|
|
|
g_exit(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
g_file_close(0);
|
|
|
|
|
|
|
|
g_file_close(1);
|
|
|
|
|
|
|
|
g_file_close(2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (g_file_open("/dev/null") < 0)
|
|
|
|
if (g_file_open("/dev/null") < 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|