Re: ?? exec prog << value ??
- From: Zeh Mau <chefmuetze@xxxxxx>
- Date: 31 May 2007 13:55:00 -0700
On 31 Mai, 22:16, Alexandre Ferrieux <alexandre.ferri...@xxxxxxxxx>
wrote:
On May 31, 9:53 pm, Zeh Mau <chefmue...@xxxxxx> wrote:
set var 4+4\n
puts $var
set result [exec test_prog << $var]
puts $result
-----------------------------------------
4+4
syntax error
can't read "result": no such variable
Very strange. Either test_prog exits with status 0 and result gets set
to something (be it an empty string), or it exits abnormally, and
[exec] raises an exception, hence cannot reach the [puts].
Can you please run strace (I mean "strace tclsh example.tcl") and post
the output ?
-Alex
You are right, the test_prog exits with exit(0),
I also tried return(1).
The error message now is:
syntax error
while executing
"exec test_prog << $var"
invoked from within
"set result [exec test_prog << $var]"
(file "example.tcl" line 5)
.
- References:
- ?? exec prog << value ??
- From: Zeh Mau
- Re: ?? exec prog << value ??
- From: Bryan Oakley
- Re: ?? exec prog << value ??
- From: Cameron Laird
- Re: ?? exec prog << value ??
- From: Zeh Mau
- Re: ?? exec prog << value ??
- From: Bryan Oakley
- Re: ?? exec prog << value ??
- From: Zeh Mau
- Re: ?? exec prog << value ??
- From: Alexandre Ferrieux
- ?? exec prog << value ??
- Prev by Date: Would like to help out...
- Previous by thread: Re: ?? exec prog << value ??
- Next by thread: Re: ?? exec prog << value ??
- Index(es):
Relevant Pages
|