@@ -435,10 +435,13 @@ static FILE *filed_log_open(const char *file) { FILE *retval; if (strcmp(file, "-") == 0) { retval = stdout; + } else if (file[0] == '|') { + file++; + retval = popen(file, "w"); } else { retval = fopen(file, "a+"); } return(retval); @@ -1091,11 +1094,13 @@ fprintf(output, " entries are made for various stages in transfering files.\n"); fprintf(output, " The log file is opened before switching users (see \"-u\")\n"); fprintf(output, " and root directories (see \"-r\"). The log file is never\n"); fprintf(output, " closed so log rotation without stopping the daemon is will\n"); fprintf(output, " not work. The value of \"-\" indicates that standard output\n"); - fprintf(output, " should be used for logging. The default is \"%s\".\n", LOG_FILE); + fprintf(output, " should be used for logging. If the filename begins with a \"|\"\n"); + fprintf(output, " then a process is started and used for logging instead of a\n"); + fprintf(output, " file. The default is \"%s\".\n", LOG_FILE); #ifdef FILED_DONT_LOG fprintf(output, " Note that logging is completely disabled so this option does\n"); fprintf(output, " nothing in this build.\n"); #endif fprintf(output, "\n");