X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fdaemon.c;h=0dcc66ff742c10e48275f4adb9694a6712c93850;hb=0809cca7f9cc397b608ac6ef81fbe9029dfb6c1a;hp=e78538cb9113e9ac4742c8cd2c43b5b47ca24825;hpb=ac718c9dbde6340a85d18c5c8d555d8e0ec88bb3;p=openvswitch diff --git a/lib/daemon.c b/lib/daemon.c index e78538cb..0dcc66ff 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -81,6 +81,13 @@ set_no_chdir(void) chdir_ = false; } +/* Will we chdir to "/" as part of daemonizing? */ +bool +is_chdir_enabled(void) +{ + return chdir_; +} + /* Normally, die_if_already_running() will terminate the program with a message * if a locked pidfile already exists. If this function is called, * die_if_already_running() will merely log a warning. */ @@ -98,6 +105,13 @@ set_detach(void) detach = true; } +/* Will daemonize() really detach? */ +bool +get_detach(void) +{ + return detach; +} + /* If a pidfile has been configured and that pidfile already exists and is * locked by a running process, returns the pid of the running process. * Otherwise, returns 0. */