return;
logf = s->error_log;
}
-#ifdef TPF
- else if (tpf_child) {
- /*
- * If we are doing normal logging, don't log messages that are
- * above the server log level unless it is a startup/shutdown notice
- */
- if (((level & APLOG_LEVELMASK) != APLOG_NOTICE) &&
- ((level & APLOG_LEVELMASK) > s->loglevel))
- return;
- logf = stderr;
- }
-#endif /* TPF */
else {
/*
* If we are doing syslog logging, don't log messages that are
tpf_server_name[INETD_SERVNAME_LENGTH + 1] = '\0';
ap_open_logs(server_conf, plog);
ap_tpf_zinet_checks(ap_standalone, tpf_server_name, server_conf);
+ ap_tpf_save_argv(argc, argv); /* save argv parms for children */
}
if (ap_standalone) {
ap_set_version();
ap_init_modules(pconf, server_conf);
version_locked++;
if(tpf_child) {
+ server_conf->error_log = stderr;
+#ifdef HAVE_SYSLOG
+ /* if ErrorLog is syslog call ap_open_logs from the child since
+ syslog isn't redirected to stderr by the Apache parent */
+ if (strncasecmp(server_conf->error_fname, "syslog", 6) == 0) {
+ ap_open_logs(server_conf, plog);
+ }
+#endif /* HAVE_SYSLOG */
copy_listeners(pconf);
reset_tpf_listeners(&input_parms.child);
- server_conf->error_log = NULL;
#ifdef SCOREBOARD_FILE
scoreboard_fd = input_parms.child.scoreboard_fd;
ap_scoreboard_image = &_scoreboard_image;
void *tpf_shm_static_ptr = NULL;
unsigned short zinet_model;
+char *argv_ptr = NULL;
static FILE *sock_fp;
fork_input.prog_type = TPF_FORK_NAME;
fork_input.istream = TPF_FORK_IS_BALANCE;
fork_input.ebw_data_length = sizeof(input_parms);
- fork_input.parm_data = "-x";
+ fork_input.parm_data = argv_ptr;
#ifdef TPF_FORK_EXTENDED
return tpf_fork(&fork_input, NULL, NULL);
#else
fcntl(sd,F_SETFD,FD_CLOEXEC);
}
+void ap_tpf_save_argv(int argc, char **argv) {
+
+ int i, len = 3; /* 3 for "-x " */
+
+ for (i = 1; i < argc; i++) { /* find len for calloc */
+ len += strlen (argv[i]);
+ ++len; /* 1 for blank */
+ }
+
+ argv_ptr = malloc(len + 1);
+ strcpy(argv_ptr, "-x");
+ for (i = 1; i < argc; i++) {
+ strcat(argv_ptr, " ");
+ strcat(argv_ptr, argv[i]);
+ }
+}
+
void os_tpf_child(APACHE_TPF_INPUT *input_parms) {
tpf_child = 1;
ap_my_generation = input_parms->generation;
#ifdef TPF_HAVE_NSD
printf(" -D TPF_HAVE_NSD\n");
#endif
+
+#ifdef HAVE_SYSLOG
+ printf(" -D HAVE_SYSLOG\n");
+#endif
}
#undef HAVE_ISNAN
#endif
+#ifdef HAVE_ISINF
+#undef HAVE_ISINF
+#endif
+
#if !defined(INLINE) && defined(USE_GNU_INLINE)
/* Compiler supports inline, so include the inlineable functions as
* part of the header
#ifdef NSIG
#undef NSIG
#endif
+void ap_tpf_save_argv(int argc, char **argv);
/* various #defines for ServerType/ZINET model checks: */