delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/05/20/08:17:39

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <002401c0e126$8527f890$503a243f@ca.boeing.com>
From: "Michael A. Chase" <mchase AT ix DOT netcom DOT com>
To: "Perry Dykes" <pdykes AT lakes DOT com>, <cygwin AT cygwin DOT com>
References: <3B075A28 DOT 86490FF9 AT lakes DOT com>
Subject: Re: Nasty bug?
Date: Sun, 20 May 2001 05:12:30 -0700
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

Is the 'megabytes of data' multiply repeated copies of the lines sent to
stdout and stderr by the main loop?

If I read the script correctly, the tail statement is sending it's output to
stdout which you have already redirected to the same file that tail is
reading from.  I don't see much sense to running 'tail -f' in background,
but if that's what you want, it should probably be started before you
redirect stdout and stderr with the exec statement.

--
Mac :})
Give a hobbit a fish and he'll eat fish for a day.
Give a hobbit a ring and he'll eat fish for an age.
----- Original Message -----
From: "Perry Dykes" <pdykes AT lakes DOT com>
To: <cygwin AT cygwin DOT com>
Sent: Saturday, May 19, 2001 22:46
Subject: Nasty bug?


> Have a script working on, and it nets down to this below.
>
> When ran, tail starts dumping megabytes of data into the "exec.log" file
> until I kill tail. Any ideas what is going on here? Seems something is
> wrong with tail, as if I do not use (thus not in the background) by
> commenting out script runs and just dumps expected content in exec.log,
> the skipped loops for number of loops *5 seconds.
>
> #!/usr/bin/bash
> set -x
> exec >exec.log 2>&1
> echo "this is in exec.log"
> tail -f exec.log &
> let x=0
> for junkit in a b c d e d d d d d e e d d d e e  d de e e  d d e e d d e
> e d d d e e d
> do
>  echo Sleeping $x
>  let x=x+5
>  sleep 5
> done
> # ok, you have now tracked output of exec script content, script over,
> kill the tee on console
> kill -9 %1
>
> Am I doing something pretty silly, or is this a tail/cygin/job control
> bug?
>
> Note %1 will keep advancing, so you will have to run this after a
> bash.exe.



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019