Log PID changes.
This commit is contained in:
parent
d75bbb528f
commit
a0fde0a4e8
@ -208,8 +208,10 @@ int daemonize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Exit if we are the parent */
|
/* Exit if we are the parent */
|
||||||
if (pid > 0)
|
if (pid > 0) {
|
||||||
|
guacd_log_info("Exiting and passing control to PID %i", pid);
|
||||||
_exit(0);
|
_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Start a new session (if not already group leader) */
|
/* Start a new session (if not already group leader) */
|
||||||
setsid();
|
setsid();
|
||||||
@ -222,8 +224,10 @@ int daemonize() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Exit if we are the parent */
|
/* Exit if we are the parent */
|
||||||
if (pid > 0)
|
if (pid > 0) {
|
||||||
|
guacd_log_info("Exiting and passing control to PID %i", pid);
|
||||||
_exit(0);
|
_exit(0);
|
||||||
|
}
|
||||||
|
|
||||||
/* Change to root directory */
|
/* Change to root directory */
|
||||||
if (chdir(GUACD_ROOT) < 0) {
|
if (chdir(GUACD_ROOT) < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user