Tk you but...
Yes you are right is not a straight telnet is more something about writing a c program that sends shell commands and retrive the answer.
It's really hard to sync the input and the output from shell...
I worked around with the code and I figurated out that my problem was with:
execl("/bin/sh", "sh", "-c", command, NULL);
now I'm able to execute execl without open a new shell.
This command works well:
execl("/usr/bin/telnet", command, ip_add, port, NULL);
where telnet it's just an alias on this solaris...
I still have problem on sync the write and reading part of the pipes...
Tks alot,
ff
|