Message ID | 20121019210802.53119.90861.stgit@seurat.1015granger.net |
---|---|
State | Accepted |
Headers | show |
diff --git a/src/fedfsd/main.c b/src/fedfsd/main.c index f0a39d6..fd6bee5 100644 --- a/src/fedfsd/main.c +++ b/src/fedfsd/main.c @@ -219,6 +219,10 @@ int main(int argc, char **argv) exit(EXIT_FAILURE); if (!foreground) { + if (chdir(FEDFS_DEFAULT_STATEDIR) == -1) { + xlog(L_ERROR, "chdir: %m"); + exit(EXIT_FAILURE); + } if (daemon(0, 0) == -1) { xlog(L_ERROR, "daemon: %m"); exit(EXIT_FAILURE);
Follow conventional practice of other RPC service daemons. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> --- src/fedfsd/main.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)