diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 00:00:11 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2009-06-12 00:00:11 +0800 |
commit | a1318a58af497bc09b3480c06e3cea2fd56baa6f (patch) | |
tree | ed4e8dfd8540d332b3a5d106d72c1d3229821986 | |
parent | ea1052be621ff3ce53331e6a258d016aa5ba2cc7 (diff) | |
download | pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.gz pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.bz2 pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.lz pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.xz pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.tar.zst pttbbs-a1318a58af497bc09b3480c06e3cea2fd56baa6f.zip |
* fix: some API/logs (eg, incorrect password attempts) require cwd=BBSHOME
git-svn-id: http://opensvn.csie.org/pttbbs/trunk@4564 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r-- | pttbbs/daemon/logind/logind.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pttbbs/daemon/logind/logind.c b/pttbbs/daemon/logind/logind.c index 6f159fb5..d4148056 100644 --- a/pttbbs/daemon/logind/logind.c +++ b/pttbbs/daemon/logind/logind.c @@ -1397,6 +1397,11 @@ main(int argc, char *argv[]) { fprintf(stderr, LOG_PREFIX "start daemonize\r\n"); daemonize(BBSHOME "/run/logind.pid", log_file); + + // because many of the libraries used in this daemon (for example, + // passwd / logging / ...) all assume cwd=BBSHOME, + // let's workaround them. + // chdir(BBSHOME); } // Some event notification mechanisms don't work across forks (e.g. kqueue) |