perl programs hang if run with daemontools

Oscar Retana <[email protected]>
Newsgroups gmane.comp.djb.syslog
Organization GridShield
Message-ID <[email protected]>
Hello list. I've using daemontools since two years ago, it's great, I
can't think of a daemon anymore without thinking in daemontools. Thanks
a lot DJB.

My problem is when running perl programs under daemontools. If my perl
script is something like this, it works fine wit daemonstools and 
multilog logs everything right:

#!/usr/bin/perl -w -T
while (1) {
   print "test\n";
}

But any real script hangs. For example, if I add a single "sleep", I 
stop receiving any log. This hangs: (or at least, it never produce any 
output; the "sleep" is just a little example that fails)

#!/usr/bin/perl -w -T
while (1) {
   print "test\n";
   sleep 1;
}

I am runnign spamassassin with daemonstools, and it turns out that the 
spamd daemon is a perl script itself. I have no problems running 
spamassassin. At the beggining of the spamd script they have some 
special things, I tried using them, but nothing.

I don't know if there's something special I should consider for Perl, if 
I want to use daemontools with it. And I have googled for serveral days, 
but nothing yet.

I apologize for posting this here, if it turns that this is not related 
at all to daemontools (or multilog), and it is a Perl issue instead. 
But maybe you have seen this behavior before, and can give me a bit of help.

Thanks a lot!


-- 
Oscar Retana
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.