Trying to get TCL to execute a program and have that program run in the backgroud while TCL does other stuff.
The external program is a "C" program, it works from the UNIX command line, The C program cannot be started before the TCL as it takes different parameters depending on what the TCL scripts gets.
here is the the TCL command:
catch {exec ~/csp/audits/user/cspnsl_builder $NE_Handle}ErrMsg
$NE_Handle is the parm that is set to the C program.
Thought about using a pipe, but not sure how to do it.
I can get an Expect script to run it, but when you call the expect script from TCL, it will not run. Here is the expect script..
set Header [lindex $argv 0]
set force_conservative 1
if {$force_conservative} {set send_slow {1 .1}; proc send {ignore arg} {exp_sleep .1; exp_send -s -- $arg}}
if { [fork] != 0 } then exit
disconnect
set env(TERM) vt100
spawn $env(SHELL)
match_max 100000
send -- "~/csp/bin/cspnsl_builder $Header &\r"
Any suggestion??
The external program is a "C" program, it works from the UNIX command line, The C program cannot be started before the TCL as it takes different parameters depending on what the TCL scripts gets.
here is the the TCL command:
catch {exec ~/csp/audits/user/cspnsl_builder $NE_Handle}ErrMsg
$NE_Handle is the parm that is set to the C program.
Thought about using a pipe, but not sure how to do it.
I can get an Expect script to run it, but when you call the expect script from TCL, it will not run. Here is the expect script..
set Header [lindex $argv 0]
set force_conservative 1
if {$force_conservative} {set send_slow {1 .1}; proc send {ignore arg} {exp_sleep .1; exp_send -s -- $arg}}
if { [fork] != 0 } then exit
disconnect
set env(TERM) vt100
spawn $env(SHELL)
match_max 100000
send -- "~/csp/bin/cspnsl_builder $Header &\r"
Any suggestion??