1 | /* |
1 | /* |
2 | * static char *rcsid_daemon_c = |
2 | * static char *rcsid_daemon_c = |
3 | * "$Id: daemon.C,v 1.2 2006/08/29 08:01:37 root Exp $"; |
3 | * "$Id: daemon.C,v 1.3 2006/08/30 16:30:37 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
70 | FILE *logfile; |
70 | FILE *logfile; |
71 | register int i; |
71 | register int i; |
72 | int forkresult; |
72 | int forkresult; |
73 | |
73 | |
74 | if((logfile=fopen(filename,"a"))==NULL){ |
74 | if((logfile=fopen(filename,"a"))==NULL){ |
75 | fprintf(stderr, "Couldn't create logfile %s: %s\n", filename, strerror_local(errno)); |
75 | fprintf(stderr, "Couldn't create logfile %s: %s\n", filename, strerror(errno)); |
76 | exit(0); |
76 | exit(0); |
77 | } |
77 | } |
78 | fputs("\n========================\n",logfile); |
78 | fputs("\n========================\n",logfile); |
79 | fputs("Begin New Server Session\n",logfile); |
79 | fputs("Begin New Server Session\n",logfile); |
80 | fputs("========================\n\n",logfile); |
80 | fputs("========================\n\n",logfile); |