Parent Directory
|
Revision Log
|
Patch
| Revision 1.19 by sysadm, Tue Apr 29 03:38:56 2025 UTC | Revision 1.20 by sysadm, Wed Apr 30 09:18:19 2025 UTC | |
|---|---|---|
| # | Line 16 | Line 16 |
| 16 | ***************************************************************************/ | ***************************************************************************/ |
| 17 | ||
| 18 | #include "bbs.h" | #include "bbs.h" |
| 19 | #include "init.h" | |
| 20 | #include "common.h" | #include "common.h" |
| 21 | #include "net_server.h" | |
| 22 | #include "log.h" | |
| 23 | #include "io.h" | #include "io.h" |
| 24 | #include "menu.h" | #include "menu.h" |
| 25 | #include <stdlib.h> | |
| 26 | #include <signal.h> | #include <signal.h> |
| 27 | #include <string.h> | #include <string.h> |
| #include <sys/types.h> | ||
| 28 | #include <unistd.h> | #include <unistd.h> |
| 29 | #include <sys/types.h> | |
| 30 | #include <sys/stat.h> | |
| 31 | ||
| 32 | void app_help(void) | void app_help(void) |
| 33 | { | { |
| # | Line 106 int main(int argc, char *argv[]) | Line 111 int main(int argc, char *argv[]) |
| 111 | ||
| 112 | // Initialize daemon | // Initialize daemon |
| 113 | if (daemon) | if (daemon) |
| 114 | { | |
| 115 | init_daemon(); | init_daemon(); |
| 116 | } | |
| 117 | ||
| 118 | // Change current dir | // Change current dir |
| 119 | strncpy(app_home_dir, argv[0], rindex(argv[0], '/') - argv[0] + 1); | strncpy(app_home_dir, argv[0], strrchr(argv[0], '/') - argv[0] + 1); |
| 120 | strcat(app_home_dir, "../"); | strcat(app_home_dir, "../"); |
| 121 | chdir(app_home_dir); | chdir(app_home_dir); |
| 122 |
|
||||||||
| webmaster@leafok.com | ViewVC Help |
| Powered by ViewVC 1.3.0-beta1 |