#define BOZO_LWP_STACKSIZE 16000
extern int BOZO_ExecuteRequest();
extern int RXSTATS_ExecuteRequest();
-extern int afsconf_GetKey();
extern struct bnode_ops fsbnode_ops, ezbnode_ops, cronbnode_ops;
void bozo_Log();
struct rx_securityClass *bozo_rxsc[3];
const char *bozo_fileName;
FILE *bozo_logFile;
-extern int rx_stackSize; /* for rx_SetStackSize macro */
int DoLogging = 0;
int DoSyslog = 0;
}
#endif
+#if 0
/*
* This routine causes the calling process to go into the background and
* to lose its controlling tty.
}
}
#endif /* ! AFS_NT40_ENV */
+#endif
/* start a process and monitor it */
char namebuf[AFSDIR_PATH_MAX];
#ifndef AFS_NT40_ENV
int nofork = 0;
+ struct stat sb;
#endif
#ifdef AFS_AIX32_ENV
struct sigaction nsa;
fflush(stdout);
#endif
- /* go into the background and remove our controlling tty */
+ /* go into the background and remove our controlling tty, close open
+ file desriptors
+ */
#ifndef AFS_NT40_ENV
if (!nofork)
- background();
+ daemon(1, 0);
#endif /* ! AFS_NT40_ENV */
- if (!DoSyslog) {
+ if ((!DoSyslog)
+#ifndef AFS_NT40_ENV
+ && ((lstat(AFSDIR_BOZLOG_FILE, &sb) == 0) &&
+ !(S_ISFIFO(sb.st_mode)))
+#endif
+ ) {
strcpy(namebuf, AFSDIR_BOZLOG_FILE);
strcat(namebuf, ".old");
renamefile(AFSDIR_BOZLOG_FILE, namebuf); /* try rename first */
rx_SetNoJumbo();
tservice = rx_NewService( /* port */ 0, /* service id */ 1,
- /*service name */ "bozo",
- /* security classes */
+ /*service name */ "bozo",
+ /* security classes */
bozo_rxsc,
/* numb sec classes */ 3, BOZO_ExecuteRequest);
rx_SetMinProcs(tservice, 2);