--- cmd.c 2011-11-21 21:50:35.000000000 +0100 +++ cmd-w-plainfile.c 2013-01-13 01:53:46.750000000 +0100 @@ -2239,6 +2239,11 @@ FILE *fp; struct stat statbuf; +#ifdef CYGWIN + struct timeval time_of_day; + char command_file_plain[MAX_FILENAME_LENGTH]; +#endif + /* * Commands are not allowed to have newlines in them, as * that allows malicious users to hand-craft requests that @@ -2247,6 +2252,7 @@ if(!cmd || !*cmd || strchr(cmd, '\n')) return ERROR; +#ifndef CYGWIN /* bail out if the external command file doesn't exist */ if(stat(command_file, &statbuf)) { @@ -2264,6 +2270,38 @@ /* open the command for writing (since this is a pipe, it will really be appended) */ fp = fopen(command_file, "w"); + +#else + /* no complete named pipe handling in Cygwin - ref http://cygwin.com/ml/cygwin/2010-08/msg00459.html + .... create one plain file for each command */ + + /* we will produce a 21-char postfix, are we still within limits ? */ + if((strlen(command_file) + 21) > MAX_FILENAME_LENGTH){ + + if(content_type==WML_CONTENT) + printf("
Error: Length of external command file path is out of limits!
\n"); + else{ + printf("