This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Nasty bug?


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@lakes.com>
To: <cygwin@cygwin.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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]