# Open a pipe for interprocess communication
my $reader = new IO::Handle;
my $writer = new IO::Handle;
-$pipe = IO::Pipe->new($reader, $writer);
-$writer->autoflush(1);
-
# Fork the logger process
-if ($progress)
+if ($^O !~ /MSWin32|dos/i && $progress)
{
+ $pipe = IO::Pipe->new($reader, $writer);
+ $writer->autoflush(1);
spawn sub
{
&multiprocess_progressbar($global_totalsize);
}
my $minproc = 1;
-$minproc = 0 if (!$progress);
+if ($^O =~ /MSWin32|dos/i || !$progress)
+{
+ $minproc = 0;
+}
# Wait for all child processes to localdie except for the logger
while (scalar keys %RUNNING_PIDS > $minproc)
{
{
my ($tmpoutfile, $nlines, $stop_offset, $totalsize, $cursize, $old_queries_count, $old_errors_count) = @_;
- if (!$tmpoutfile) {
+ if (!$tmpoutfile || not defined $pipe) {
if ($progress && (($nlines % $NUMPROGRESS) == 0)) {
if ($totalsize) {
print STDERR &progress_bar($$cursize, $stop_offset || $totalsize, 25, '=');
{
if ($progress && ($getout != 1))
{
- if (!$tmpoutfile)
+ if (!$tmpoutfile || not defined $pipe)
{
if ($totalsize)
{
$cursize = $totalsize;
}
- if (!$tmpoutfile)
+ if (!$tmpoutfile|| not defined $pipe)
{
if ($totalsize)
{