diff options
| author | fukachan <fukachan> | 2006-06-12 22:53:06 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-06-12 22:53:06 +0000 |
| commit | 0675ac3efdf8c68d19e74cbc9e6bf5a2f807ebc8 (patch) | |
| tree | 33b9d6ba98c7b6635e24d6be217aeb75dded9736 /regress | |
| parent | 0c28d3d2c2a08d45a5baf8ac4a9c9ffbf1308e23 (diff) | |
| download | fml8-0675ac3efdf8c68d19e74cbc9e6bf5a2f807ebc8.tar.gz fml8-0675ac3efdf8c68d19e74cbc9e6bf5a2f807ebc8.tar.bz2 fml8-0675ac3efdf8c68d19e74cbc9e6bf5a2f807ebc8.zip | |
permission of queue directory is 0730.
use sysread/syswrite not <>.
Diffstat (limited to 'regress')
| -rw-r--r-- | regress/tinymta/Drop.pm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/regress/tinymta/Drop.pm b/regress/tinymta/Drop.pm index 5e87945d..a6ec0fd2 100644 --- a/regress/tinymta/Drop.pm +++ b/regress/tinymta/Drop.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: @template.pm,v 1.10 2006/01/07 13:16:41 fukachan Exp $ +# $FML: Drop.pm,v 1.1.1.1 2006/06/10 01:05:10 fukachan Exp $ # package TinyMTA::Drop; @@ -54,10 +54,13 @@ sub run # 1. prepare queue directory. my $queue_dir = $config->{ queue_dir }; unless (-d $queue_dir) { - mkdir $queue_dir, 0720; + mkdir $queue_dir, 0730; if (-d $queue_dir) { $self->log("$queue_dir created"); } + else { + $self->logerror("cannot mkdir $queue_dir"); + } } # 2. drop the message taken from STDIN into a new queue file. @@ -68,8 +71,8 @@ sub run $wh->autoflush(1); LINE: - while ($buf = <STDIN>) { - print $wh $buf; + while (sysread(STDIN, $buf, 8192)) { + syswrite($wh, $buf, 8192); } $wh->close(); } |
