Home > Archive > Tcl > June 2007 > Newbie Help
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| jsahiwal@gmail.com 2007-06-27, 4:22 am |
| I am using expect libraries along with C to run a program and am
running into problems. My expect script runs just fine, just the C
program gives me the following error. Can someone please enlighten me
a little, read FAQ's saw something blaming C libraries, I would like
to confirm that .
exp_is_debugging =1;
if ((MyFD=exp_spawnl("udt","udt",(char*)0)) < 0 )
{
printf("Error in Expect\n");
return (-1);
}
if ((fd2=exp_expectl(MyFD,exp_glob,"*novell",2,exp_end)) != 2)
{
printf("fd2=%d,Error in expectl\n",fd2);
return (-1);
}
length=write(MyFD,"abcd1234\r",9);
return(MyFD);
Result Log
F08 /home/dtusers/novell/suntest-18>>./test-pass
parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child
expect: does {} match {*novell}? no
expect: does {\x1b[H\x1b[2J} match {*novell}? no
UniData Release expect: does {\x1b[H\x1b[2JUniData Release } match
{*novell}? no
7.1 Build: (3193)
(c) Copyright IBM Corporation 2006.
All rights reserved.
expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\n} match
{*novell}? no
Current UniData home is /usr/local/royalty/ud71/.
expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
UniData home is /usr/local/royalty/ud71/.\r\n} match {*novell}? no
Current working directory is /datatel/coll18/development/apphome.
expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
UniData home is /usr/local/royalty/ud71/.\r\nCurrent working directory
is /datatel/coll18/development/apphome.\r\n} match {*novell}? no
Envision Initialized
expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
UniData home is /usr/local/royalty/ud71/.\r\nCurrent working directory
is /datatel/coll18/development/apphome.\r\nEnvision Initialized\r\n}
match {*novell}? no
Enter Database Password for User 'novell': expect: does {\x1b[H
\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c) Copyright IBM
Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent UniData home
is /usr/local/royalty/ud71/.\r\nCurrent working directory is /datatel/
coll18/development/apphome.\r\nEnvision Initialized\r\nEnter Database
Password for User 'novell': } match {*novell}? yes
exp_buffer is {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
UniData home is /usr/local/royalty/ud71/.\r\nCurrent working directory
is /datatel/coll18/development/apphome.\r\nEnvision Initialized\r
\nEnter Database Password for User 'novell': }
| |
| Bezoar 2007-06-27, 4:22 am |
| On Jun 26, 5:26 pm, jsahi...@gmail.com wrote:
> I am using expect libraries along with C to run a program and am
> running into problems. My expect script runs just fine, just the C
> program gives me the following error. Can someone please enlighten me
> a little, read FAQ's saw something blaming C libraries, I would like
> to confirm that .
>
> exp_is_debugging =1;
> if ((MyFD=exp_spawnl("udt","udt",(char*)0)) < 0 )
> {
> printf("Error in Expect\n");
> return (-1);
> }
> if ((fd2=exp_expectl(MyFD,exp_glob,"*novell",2,exp_end)) != 2)
> {
> printf("fd2=%d,Error in expectl\n",fd2);
> return (-1);
> }
> length=write(MyFD,"abcd1234\r",9);
> return(MyFD);
>
> Result Log
> F08 /home/dtusers/novell/suntest-18>>./test-pass
> parent: waiting for sync byte
> parent: telling child to go ahead
> parent: now unsynchronized from child
> expect: does {} match {*novell}? no
>
> expect: does {\x1b[H\x1b[2J} match {*novell}? no
> UniData Release expect: does {\x1b[H\x1b[2JUniData Release } match
> {*novell}? no
> 7.1 Build: (3193)
> (c) Copyright IBM Corporation 2006.
> All rights reserved.
>
> expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
> Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\n} match
> {*novell}? no
> Current UniData home is /usr/local/royalty/ud71/.
> expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
> Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
> UniData home is /usr/local/royalty/ud71/.\r\n} match {*novell}? no
> Current working directory is /datatel/coll18/development/apphome.
> expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
> Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
> UniData home is /usr/local/royalty/ud71/.\r\nCurrent working directory
> is /datatel/coll18/development/apphome.\r\n} match {*novell}? no
> Envision Initialized
> expect: does {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
> Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
> UniData home is /usr/local/royalty/ud71/.\r\nCurrent working directory
> is /datatel/coll18/development/apphome.\r\nEnvision Initialized\r\n}
> match {*novell}? no
> Enter Database Password for User 'novell': expect: does {\x1b[H
> \x1b[2JUniData Release 7.1 Build: (3193)\r\n(c) Copyright IBM
> Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent UniData home
> is /usr/local/royalty/ud71/.\r\nCurrent working directory is /datatel/
> coll18/development/apphome.\r\nEnvision Initialized\r\nEnter Database
> Password for User 'novell': } match {*novell}? yes
> exp_buffer is {\x1b[H\x1b[2JUniData Release 7.1 Build: (3193)\r\n(c)
> Copyright IBM Corporation 2006.\r\nAll rights reserved.\r\n\r\nCurrent
> UniData home is /usr/local/royalty/ud71/.\r\nCurrent working directory
> is /datatel/coll18/development/apphome.\r\nEnvision Initialized\r
> \nEnter Database Password for User 'novell': }
Sorry but what error?
Carl
| |
| jsahiwal@gmail.com 2007-06-27, 7:12 pm |
| When the code executes
"parent: waiting for sync byte
parent: telling child to go ahead
parent: now unsynchronized from child "
this happens, and as a result when I try to write to the fd i am
unable to ?
On Jun 26, 11:43 pm, Bezoar <cwjo...@gmail.com> wrote:
> On Jun 26, 5:26 pm, jsahi...@gmail.com wrote:
>
>
>
>
>
>
>
>
> Sorry but what error?
>
> Carl
|
|
|
|
|