{
struct child *ch;
struct config *ccf;
+ struct headmod *head;
char *twd;
- if(!strncmp(path, "./", 2))
+ for(head = pat->headers; head != NULL; head = head->next) {
+ headrmheader(req, head->name);
+ headappheader(req, head->name, head->value);
+ }
+ if(!strncmp(path, "./", 2) && path[2])
path += 2;
if(pat->fchild) {
headappheader(req, "X-Ash-File", path);
struct child *ch;
cf = getconfig(path);
- if(cf->capture != NULL) {
+ if((cf->capture != NULL) && (cf->caproot || !cf->path || strcmp(cf->path, "."))) {
cpath = sprintf2("%s/", path);
if((ch = findchild(cpath, cf->capture, &ccf)) == NULL) {
free(cpath);
static void chldhandler(int sig)
{
pid_t pid;
+ int st;
- do {
- pid = waitpid(-1, NULL, WNOHANG);
- } while(pid > 0);
+ while((pid = waitpid(-1, &st, WNOHANG)) > 0) {
+ if(WCOREDUMP(st))
+ flog(LOG_WARNING, "child process %i dumped core", pid);
+ }
}
static void sighandler(int sig)