Mail-QmailQueueの修正
メール送信にQmailのqmail-queueを直接呼び出す、Mail::Qmailqueueを使おうしたところ。エラーで動かなかった。
Can't call method "fdopen" on an undefined value at /usr/lib/perl5/site_perl/5.6.1/Mail/QmailQueue.pm line 103, <> line 5. Broken pipe
ちなみにPerlは「「 v5.6.1 built for i386-linux」」
どうも、96行目あたりの
my $fd0 = IO::Handle->new->fdopen(0,"w"); my $fd1 = IO::Handle->new->fdopen(1,"w");
を
my $fd0 = IO::Handle->new->fdopen(0,"r"); my $fd1 = IO::Handle->new->fdopen(1,"w");
としなければならないようだ。
記述子0は標準入力なので、「w」の書き込みモードでは失敗をしてしまうということなのかな。
以下Patch
--- QmailQueue.pm.orig Tue Jun 1 15:07:08 2004
+++ QmailQueue.pm Tue Jun 1 17:39:28 2004
@@ -96,7 +96,7 @@
wait;
} elsif (defined $pid) {
- my $fd0 = IO::Handle->new->fdopen(0,"w");
+ my $fd0 = IO::Handle->new->fdopen(0,"r");
my $fd1 = IO::Handle->new->fdopen(1,"w");
$data->reader();
$addr->reader();