On Dec 27, 2007 9:58 PM, Dmitriy Pomerantsev <lrngate@...> wrote:
> This targets are use non-portable fucntions: waitpid, pipe and fork. (At least there functions are present in the source code.) Windows have its own native functions like WaitForSingleObject, CreatePipe and CreateProcess.
They are portable to most platforms, except for Windows. I added some
code to use _pipe, _spawnlp and _cwait, allowing these targets to be
built and used on Windows. Unfortunately _spawnlp does't preserve
arguments properly - pxegeek reported that convert (used by
mod_imagemagick) had an error when writing to paths with spaces in the
name. I see now that the _spawnlp documentation says that spaces need
to be escaped. CreateProcess seems to suffer from the same problem and
I don't see any Win32 function to escape command-line parameters as
CreateProcess/_spawnlp expect. I'm out of my depth on Win32, so I'd
appreciate a patch here.