Brandon Peirce <brandon_peirce <at> hotmail.com> writes:

> Did you try running the test in the foreground, without the script and 
> without
> too many other things running at the same time?
> 

Sorry for the late reply. I have been away over
the weekend. The tests work normally without
scripting.
Compiling the complete LFS it again stopped at the
same point. I use the following command command style for
backgrounding the script:

Ref:
http://www.askdavetaylor.com/my_background_jobs_in_linux_have_become_invisible.html
$ nohup rsync args > /tmp/rsync.log &
Then, if you want to watch it working, simply use:
$ tail -f /tmp/rsync.log

When I interrupt the script with Ctr-C the following is
the output:

run-posixpat
run-precedence
run-printf
run-quote
run-read
warning: please do not consider output differing only in the amount of
warning: white space to be an error.
40c40
< ./read2.sub: line 13: /dev/tty: No such device or address
---
> ./read2.sub: line 13: read: -3: invalid timeout specification
62c62
<       0       0       0
---
>        0       0       0


The file run-read is this:
==========================
echo "warning: please do not consider output differing only in the amount of" 
>&2
echo "warning: white space to be an error." >&2
${THIS_SH} ./read.tests > /tmp/xx 2>&1
diff /tmp/xx read.right && rm -f /tmp/xx

The file read.tests has this:
=============================
# test read -t timeout behavior
${THIS_SH} ./read2.sub

and read2.sub is:
=================
a=4

read -t 2 a < /dev/tty
echo $?

echo $a

sleep 5 | read -t 1 a
echo $?

echo $a

read -t -3 a < /dev/tty
echo $?

echo $a

# the above should all time out
echo abcde | {
        read -t 2 a
        echo $a
}

I have a master script that runs the bash script and also
creates the log files. The error output states:
 ./read2.sub: line 13: /dev/tty: No such device or address
and read2.sub is looking for input from /dev/tty
which does exist.

ISTM that the combination of commands is a problem:
backgrounding with &,
using 2>&1 in the script for log generation,
the run-read tests using a variety of
redirections

OR

The read2.sub test says:
# the above should all time out
and the timeout error is lost/not trapped in
the redirection confusion.

One idea I have is to put set -e and set +e
around this test.

Any other ideas?

Thanks,

Peter


-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to