On Sunday 18 January 2004 21:05 CET Sidney Markowitz wrote:
> Malte S. Stretz wrote:
> > spamd isn't started directly but an intermediate script SATest.pl
> > which does the redirection of STDOUT and STDERR
>
> Do you mean SATest.pm? That's where the call to system() is.
>
> Here is the problem: The only way to fork the background in the
> background is to use the 'start' command to launch it. If you try to use
> redirection with a 'start' command, the output of start is redirected
> but the stdin and stdout handles are not passed to the process it starts
> up. There is no workaround that I know. You cannot get both the running
> in the background and the redirection. Good old Windoze.

You can if you put Perl in between :) But I thought the wrong way round when 
I wrote the code. I just committed another change which should make the 
stuff work. You need to set the following variables:
  SPAMD_FORKER=start \cygwin\bin\perl
  SPAMD_SCRIPT=\cygwin\bin\perl -w -T /bin/spamd
I'm not sure about the latter. If the wrapper script was already called via 
the cygwin Perl, it should be enough (or necessary) to say
  SPAMD_SCRIPT=/bin/spamd
or
  SPAMD_SCRIPT=/bin/perl -w -T /bin/spamd

('-x' and '-s stderr' are no longer necessary, as they are the default now)

> > But what I really wanted to know, does spamc still compiles
> > successfully after the move?
>
> Yes, it works fine! :-)

That's good, I wasn't sure if VC would like the getopt.{c,h} files in the 
subdirectoy.

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>

Reply via email to