Diff

Differences From Artifact [efe5cb96e7]:

To Artifact [c52c45f3be]:


   433    433   }
   434    434   
   435    435   static FILE *filed_log_open(const char *file) {
   436    436   	FILE *retval;
   437    437   
   438    438   	if (strcmp(file, "-") == 0) {
   439    439   		retval = stdout;
          440  +	} else if (file[0] == '|') {
          441  +		file++;
          442  +		retval = popen(file, "w");
   440    443   	} else {
   441    444   		retval = fopen(file, "a+");
   442    445   	}
   443    446   
   444    447   	return(retval);
   445    448   }
   446    449   
................................................................................
  1089   1092   		fprintf(output, "\n");
  1090   1093   		fprintf(output, "      -l (or --log) specifies a filename to open for writing log entries.  Log\n");
  1091   1094   		fprintf(output, "                    entries are made for various stages in transfering files.\n");
  1092   1095   		fprintf(output, "                    The log file is opened before switching users (see \"-u\")\n");
  1093   1096   		fprintf(output, "                    and root directories (see \"-r\").  The log file is never\n");
  1094   1097   		fprintf(output, "                    closed so log rotation without stopping the daemon is will\n");
  1095   1098   		fprintf(output, "                    not work.  The value of \"-\" indicates that standard output\n");
  1096         -		fprintf(output, "                    should be used for logging.  The default is \"%s\".\n", LOG_FILE);
         1099  +		fprintf(output, "                    should be used for logging.  If the filename begins with a \"|\"\n");
         1100  +		fprintf(output, "                    then a process is started and used for logging instead of a\n");
         1101  +		fprintf(output, "                    file.  The default is \"%s\".\n", LOG_FILE);
  1097   1102   #ifdef FILED_DONT_LOG
  1098   1103   		fprintf(output, "                    Note that logging is completely disabled so this option does\n");
  1099   1104   		fprintf(output, "                    nothing in this build.\n");
  1100   1105   #endif
  1101   1106   		fprintf(output, "\n");
  1102   1107   		fprintf(output, "      -u (or --user) specifies the user to switch user IDs to before servicing\n");
  1103   1108   		fprintf(output, "                     requests.  The default is not change user IDs.\n");