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.

The only way to run a process in the background and have it redirect its output is to pass filenames in as arguments and have it dup stdin and stdout.

The --stdout switch had the disadvantage, that it didn't
catch *all* output generated by spamd because the stuff was
redirected after some output had already been generated.

I don't see that! I just tried running spamd with the --stdout patch I submitted using the --stdout switch and all output went to the file I gave it. The first output line with the debug switch set is "Score set 0 chosen". What do you see? Perhaps I uploaded the patch before I got that working right and had the dup of stdout too late? I recall making that mistake and then correcting it, I may have uploaded the wrong version. If you want I'll submit a patch for the --stdout option again, as the version I have here works.


But what I really wanted to know, does spamc still compiles successfully after the move?

Yes, it works fine! :-)

-- sidney

Reply via email to