[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug in local_exec
From: |
Daniel Jacobowitz |
Subject: |
Bug in local_exec |
Date: |
Wed, 4 Oct 2006 11:06:46 -0400 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
We discovered today that using remote_exec with just an output file
doesn't work. Put this in a .exp file and run it with runtest:
remote_exec host "sh -c {gcc -v 2>&1}" "" "" "outfile"
You'll get a TCL exception. After a while debugging it, we worked out
that this is because local_exec uses:
open "| sh ..." w
The problem with that is we then open that as a spawn, and read from
it, waiting for EOF. But you can't read from the write end of a pipe.
The read returns EBADF and expect throws in the towel.
This works fine:
remote_exec host "sh -c {gcc -v 2>&1}" "" "/dev/null" "outfile"
I think using mode w here is invalid.
--
Daniel Jacobowitz
CodeSourcery
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Bug in local_exec,
Daniel Jacobowitz <=